diff options
author | Taylor Braun-Jones <taylor@braun-jones.org> | 2019-01-09 13:02:47 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-28 08:24:50 -0500 |
commit | a5098cad94c152e397b258be69ae152eb1bda3df (patch) | |
tree | 75055f8a973456e38b65b4f6db9961858c66ddb5 /Tests/RunCMake/CommandLine | |
parent | 40628b2519ae1553a33f701cf46ee8fbbd013b85 (diff) | |
download | cmake-a5098cad94c152e397b258be69ae152eb1bda3df.tar.gz |
cmake: Add --ignore-eol option to `-E compare_files` command
Fixes: #13007
Diffstat (limited to 'Tests/RunCMake/CommandLine')
10 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-different-eol-result.txt b/Tests/RunCMake/CommandLine/E_compare_files-different-eol-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_compare_files-different-eol-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt new file mode 100644 index 0000000000..4729ccb8fa --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt @@ -0,0 +1 @@ +^Files ".*/compare_files/lf" to ".*/compare_files/crlf" are different.$ diff --git a/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-result.txt b/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt new file mode 100644 index 0000000000..8a9ca81f88 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt @@ -0,0 +1 @@ +^Files "nonexistent_a" to "nonexistent_b" are different.$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index c1aaf0db89..23fb9ef46d 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -18,6 +18,10 @@ run_cmake_command(Uno-src ${CMAKE_COMMAND} -B DummyBuildDir -UVAR) run_cmake_command(E-no-arg ${CMAKE_COMMAND} -E) run_cmake_command(E_capabilities ${CMAKE_COMMAND} -E capabilities) run_cmake_command(E_capabilities-arg ${CMAKE_COMMAND} -E capabilities --extra-arg) +run_cmake_command(E_compare_files-different-eol ${CMAKE_COMMAND} -E compare_files ${RunCMake_SOURCE_DIR}/compare_files/lf ${RunCMake_SOURCE_DIR}/compare_files/crlf) +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_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) diff --git a/Tests/RunCMake/CommandLine/compare_files/.gitattributes b/Tests/RunCMake/CommandLine/compare_files/.gitattributes new file mode 100644 index 0000000000..91d5c104c9 --- /dev/null +++ b/Tests/RunCMake/CommandLine/compare_files/.gitattributes @@ -0,0 +1,2 @@ +crlf eol=crlf +lf eol=lf diff --git a/Tests/RunCMake/CommandLine/compare_files/crlf b/Tests/RunCMake/CommandLine/compare_files/crlf new file mode 100644 index 0000000000..a29bdeb434 --- /dev/null +++ b/Tests/RunCMake/CommandLine/compare_files/crlf @@ -0,0 +1 @@ +line1 diff --git a/Tests/RunCMake/CommandLine/compare_files/empty1 b/Tests/RunCMake/CommandLine/compare_files/empty1 new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/CommandLine/compare_files/empty1 diff --git a/Tests/RunCMake/CommandLine/compare_files/empty2 b/Tests/RunCMake/CommandLine/compare_files/empty2 new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Tests/RunCMake/CommandLine/compare_files/empty2 diff --git a/Tests/RunCMake/CommandLine/compare_files/lf b/Tests/RunCMake/CommandLine/compare_files/lf new file mode 100644 index 0000000000..a29bdeb434 --- /dev/null +++ b/Tests/RunCMake/CommandLine/compare_files/lf @@ -0,0 +1 @@ +line1 |