summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2015-12-09 14:59:43 (GMT)
committerBrad King <brad.king@kitware.com>2015-12-10 14:07:38 (GMT)
commit7984ac5e58722295e71f6c2418e2a54d6f1a0cc1 (patch)
treed94e938704d3314f1e24018235a524a26daeb5f9 /Tests/RunCMake/CommandLine
parent4ce6fbc76b0ebaeef258695c2b876061b5b61073 (diff)
downloadCMake-7984ac5e58722295e71f6c2418e2a54d6f1a0cc1.zip
CMake-7984ac5e58722295e71f6c2418e2a54d6f1a0cc1.tar.gz
CMake-7984ac5e58722295e71f6c2418e2a54d6f1a0cc1.tar.bz2
cmake: Teach -E make_directory to support multiple input directories
Diffstat (limited to 'Tests/RunCMake/CommandLine')
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt0
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt0
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake14
7 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt
new file mode 100644
index 0000000..08a9428
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt
@@ -0,0 +1 @@
+^Error creating directory .*file_for_test.txt\".$
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 57036ba..5e2200f 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -140,6 +140,20 @@ unset(in)
unset(out)
unset(outfile)
+set(out ${RunCMake_BINARY_DIR}/make_directory_output)
+set(outfile ${out}/file_for_test.txt)
+file(REMOVE_RECURSE "${out}")
+file(MAKE_DIRECTORY ${out})
+file(WRITE ${outfile} "")
+run_cmake_command(E_make_directory-three-directories
+ ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${out}/d2)
+run_cmake_command(E_make_directory-directory-with-parent
+ ${CMAKE_COMMAND} -E make_directory ${out}/parent/child)
+run_cmake_command(E_make_directory-three-directories-and-file
+ ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${outfile})
+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)