mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Tests: Add cases covering bad ctest output truncation types
Issue: #23869
This commit is contained in:
@@ -294,6 +294,7 @@ endfunction()
|
||||
run_TestOutputTruncation("head" "\\.\\.\\.6789")
|
||||
run_TestOutputTruncation("middle" "12\\.\\.\\..*\\.\\.\\.89")
|
||||
run_TestOutputTruncation("tail" "12345\\.\\.\\.")
|
||||
run_TestOutputTruncation("bad" "")
|
||||
|
||||
# Test --stop-on-failure
|
||||
function(run_stop_on_failure)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
^CMake Error: Invalid value for '--test-output-truncation': bad$
|
||||
@@ -95,6 +95,7 @@ endfunction()
|
||||
run_TestOutputTruncation("head" "\\.\\.\\.6789")
|
||||
run_TestOutputTruncation("middle" "12\\.\\.\\..*\\.\\.\\.89")
|
||||
run_TestOutputTruncation("tail" "12345\\.\\.\\.")
|
||||
run_TestOutputTruncation("bad" "")
|
||||
|
||||
run_ctest_test(TestRepeatBad1 REPEAT UNKNOWN:3)
|
||||
run_ctest_test(TestRepeatBad2 REPEAT UNTIL_FAIL:-1)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml")
|
||||
if(test_xml_file)
|
||||
set(RunCMake_TEST_FAILED "Test.xml should not exist:\n ${test_xml_file}")
|
||||
endif()
|
||||
@@ -0,0 +1 @@
|
||||
[^0]
|
||||
@@ -0,0 +1 @@
|
||||
^Invalid value for CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION: bad$
|
||||
Reference in New Issue
Block a user