diff options
author | Asit Dhal <dhal.asitk@gmail.com> | 2020-06-12 02:59:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-15 16:39:37 (GMT) |
commit | b5b60755228e3b1489d5cd43622c08d0d8d77bc9 (patch) | |
tree | 1c9b1df401df457c0db676bf1d90c98111fe85db /Tests/RunCMake/CommandLine | |
parent | 43b10e2411858ae7734c54480a8c0c6c3ccd659b (diff) | |
download | CMake-b5b60755228e3b1489d5cd43622c08d0d8d77bc9.zip CMake-b5b60755228e3b1489d5cd43622c08d0d8d77bc9.tar.gz CMake-b5b60755228e3b1489d5cd43622c08d0d8d77bc9.tar.bz2 |
cmake: add dedicated error for -E compare_files invalid arguments
Return 2 when user provides invalid arguments
Fixes: #20815
Diffstat (limited to 'Tests/RunCMake/CommandLine')
3 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt @@ -0,0 +1 @@ +2 diff --git a/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 16fdeef..f291f15 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -22,6 +22,7 @@ run_cmake_command(E_compare_files-different-eol ${CMAKE_COMMAND} -E compare_file run_cmake_command(E_compare_files-ignore-eol-same ${CMAKE_COMMAND} -E compare_files --ignore-eol ${RunCMake_SOURCE_DIR}/compare_files/lf ${RunCMake_SOURCE_DIR}/compare_files/crlf) run_cmake_command(E_compare_files-ignore-eol-empty ${CMAKE_COMMAND} -E compare_files --ignore-eol ${RunCMake_SOURCE_DIR}/compare_files/empty1 ${RunCMake_SOURCE_DIR}/compare_files/empty2) run_cmake_command(E_compare_files-ignore-eol-nonexistent ${CMAKE_COMMAND} -E compare_files --ignore-eol nonexistent_a nonexistent_b) +run_cmake_command(E_compare_files-invalid-arguments ${CMAKE_COMMAND} -E compare_files file1.txt file2.txt file3.txt) run_cmake_command(E_echo_append ${CMAKE_COMMAND} -E echo_append) run_cmake_command(E_rename-no-arg ${CMAKE_COMMAND} -E rename) run_cmake_command(E_server-arg ${CMAKE_COMMAND} -E server --extra-arg) |