summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-07-18 21:39:27 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-20 20:03:12 (GMT)
commit5512057c13104ca300965bc48cf18371c6b5a89a (patch)
tree1760ded7109512b62d3f0369ef8e70d91465ac72 /Tests
parent1cf2c94c69cffeb5dde30ca13e5f341f184b3b4c (diff)
downloadCMake-5512057c13104ca300965bc48cf18371c6b5a89a.zip
CMake-5512057c13104ca300965bc48cf18371c6b5a89a.tar.gz
CMake-5512057c13104ca300965bc48cf18371c6b5a89a.tar.bz2
Tests: Add RunCMake.file-CHMOD cases for keywords missing values
These make the existing `no-perms` case redundant, so repurpose it to replace `no-keyword`.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt (renamed from Tests/RunCMake/file-CHMOD/no-keyword-result.txt)0
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt3
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake2
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt3
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-file-perms.cmake2
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-perms-result.txt1
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt3
-rw-r--r--Tests/RunCMake/file-CHMOD/missing-perms.cmake2
-rw-r--r--Tests/RunCMake/file-CHMOD/no-keyword-stderr.txt3
-rw-r--r--Tests/RunCMake/file-CHMOD/no-keyword.cmake2
-rw-r--r--Tests/RunCMake/file-CHMOD/no-perms.cmake2
13 files changed, 21 insertions, 7 deletions
diff --git a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
index 52a8ad6..e6b1169 100644
--- a/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake
@@ -1,7 +1,9 @@
include(RunCMake)
run_cmake_script(no-perms)
-run_cmake_script(no-keyword)
+run_cmake_script(missing-perms)
+run_cmake_script(missing-file-perms)
+run_cmake_script(missing-dir-perms)
run_cmake_script(all-perms)
run_cmake_script(invalid-perms)
run_cmake_script(invalid-path)
diff --git a/Tests/RunCMake/file-CHMOD/no-keyword-result.txt b/Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/file-CHMOD/no-keyword-result.txt
+++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt
diff --git a/Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt
new file mode 100644
index 0000000..2672462
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error at [^
+]*/missing-dir-perms.cmake:[0-9]+ \(file\):
+ file DIRECTORY_PERMISSIONS is not given any arguments$
diff --git a/Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake b/Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake
new file mode 100644
index 0000000..9d0fdad
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake
@@ -0,0 +1,2 @@
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ DIRECTORY_PERMISSIONS)
diff --git a/Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt b/Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt
new file mode 100644
index 0000000..ae4132f
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error at [^
+]*/missing-file-perms.cmake:[0-9]+ \(file\):
+ file FILE_PERMISSIONS is not given any arguments$
diff --git a/Tests/RunCMake/file-CHMOD/missing-file-perms.cmake b/Tests/RunCMake/file-CHMOD/missing-file-perms.cmake
new file mode 100644
index 0000000..bcf35aa
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-file-perms.cmake
@@ -0,0 +1,2 @@
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS OWNER_READ FILE_PERMISSIONS)
diff --git a/Tests/RunCMake/file-CHMOD/missing-perms-result.txt b/Tests/RunCMake/file-CHMOD/missing-perms-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-perms-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt b/Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt
new file mode 100644
index 0000000..fd88e7f
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error at [^
+]*/missing-perms.cmake:[0-9]+ \(file\):
+ file PERMISSIONS is not given any arguments$
diff --git a/Tests/RunCMake/file-CHMOD/missing-perms.cmake b/Tests/RunCMake/file-CHMOD/missing-perms.cmake
new file mode 100644
index 0000000..da9f182
--- /dev/null
+++ b/Tests/RunCMake/file-CHMOD/missing-perms.cmake
@@ -0,0 +1,2 @@
+file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a FILE_PERMISSIONS OWNER_READ PERMISSIONS)
diff --git a/Tests/RunCMake/file-CHMOD/no-keyword-stderr.txt b/Tests/RunCMake/file-CHMOD/no-keyword-stderr.txt
deleted file mode 100644
index 41624a3..0000000
--- a/Tests/RunCMake/file-CHMOD/no-keyword-stderr.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-^CMake Error at [^
-]*/no-keyword\.cmake:[0-9]+ \(file\):
- file No permissions given$
diff --git a/Tests/RunCMake/file-CHMOD/no-keyword.cmake b/Tests/RunCMake/file-CHMOD/no-keyword.cmake
deleted file mode 100644
index 602cfc2..0000000
--- a/Tests/RunCMake/file-CHMOD/no-keyword.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a)
-file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a)
diff --git a/Tests/RunCMake/file-CHMOD/no-perms.cmake b/Tests/RunCMake/file-CHMOD/no-perms.cmake
index 346f946..602cfc2 100644
--- a/Tests/RunCMake/file-CHMOD/no-perms.cmake
+++ b/Tests/RunCMake/file-CHMOD/no-perms.cmake
@@ -1,2 +1,2 @@
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/a)
-file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a PERMISSIONS)
+file(CHMOD ${CMAKE_CURRENT_BINARY_DIR}/a)