diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2015-12-06 19:30:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-12-07 15:51:27 (GMT) |
commit | bc35087da3eb9039dad8fb5d27c1fab60b43f776 (patch) | |
tree | 3dd571955e4de96714ea37bde105f64155220ae8 /Tests/RunCMake | |
parent | 98be140fc0dc0bab8955c4fea9274ea52ac8cd9c (diff) | |
download | CMake-bc35087da3eb9039dad8fb5d27c1fab60b43f776.zip CMake-bc35087da3eb9039dad8fb5d27c1fab60b43f776.tar.gz CMake-bc35087da3eb9039dad8fb5d27c1fab60b43f776.tar.bz2 |
cmake: Teach -E copy_directory to support multiple input directories
Diffstat (limited to 'Tests/RunCMake')
10 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..6ca3677 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt @@ -0,0 +1,3 @@ +^Error copying directory from .* to .*file_for_test.txt\".* +Error copying directory from .* to .*file_for_test.txt\".* +Error copying directory from .* to .*file_for_test.txt\".$ diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index dbc235d..57036ba 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -124,6 +124,23 @@ run_cmake_command(E_copy_if_different-three-source-files-target-is-file unset(in) unset(out) +set(in ${RunCMake_SOURCE_DIR}/copy_input) +set(out ${RunCMake_BINARY_DIR}/copy_directory_output) +set(outfile ${out}/file_for_test.txt) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +file(WRITE ${outfile} "") +run_cmake_command(E_copy_directory-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${out}) +run_cmake_command(E_copy_directory-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${outfile}) +run_cmake_command(E_copy_directory-three-source-files-target-is-not-exist + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${out}/not_existing_directory) +unset(in) +unset(out) +unset(outfile) + + run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) diff --git a/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt b/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt b/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt b/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt |