From 5512057c13104ca300965bc48cf18371c6b5a89a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 18 Jul 2022 17:39:27 -0400 Subject: 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`. --- Tests/RunCMake/file-CHMOD/RunCMakeTest.cmake | 4 +++- Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt | 1 + Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt | 3 +++ Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake | 2 ++ Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt | 1 + Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt | 3 +++ Tests/RunCMake/file-CHMOD/missing-file-perms.cmake | 2 ++ Tests/RunCMake/file-CHMOD/missing-perms-result.txt | 1 + Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt | 3 +++ Tests/RunCMake/file-CHMOD/missing-perms.cmake | 2 ++ Tests/RunCMake/file-CHMOD/no-keyword-result.txt | 1 - Tests/RunCMake/file-CHMOD/no-keyword-stderr.txt | 3 --- Tests/RunCMake/file-CHMOD/no-keyword.cmake | 2 -- Tests/RunCMake/file-CHMOD/no-perms.cmake | 2 +- 14 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt create mode 100644 Tests/RunCMake/file-CHMOD/missing-dir-perms-stderr.txt create mode 100644 Tests/RunCMake/file-CHMOD/missing-dir-perms.cmake create mode 100644 Tests/RunCMake/file-CHMOD/missing-file-perms-result.txt create mode 100644 Tests/RunCMake/file-CHMOD/missing-file-perms-stderr.txt create mode 100644 Tests/RunCMake/file-CHMOD/missing-file-perms.cmake create mode 100644 Tests/RunCMake/file-CHMOD/missing-perms-result.txt create mode 100644 Tests/RunCMake/file-CHMOD/missing-perms-stderr.txt create mode 100644 Tests/RunCMake/file-CHMOD/missing-perms.cmake delete mode 100644 Tests/RunCMake/file-CHMOD/no-keyword-result.txt delete mode 100644 Tests/RunCMake/file-CHMOD/no-keyword-stderr.txt delete mode 100644 Tests/RunCMake/file-CHMOD/no-keyword.cmake 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/missing-dir-perms-result.txt b/Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file-CHMOD/missing-dir-perms-result.txt @@ -0,0 +1 @@ +1 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-result.txt b/Tests/RunCMake/file-CHMOD/no-keyword-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/file-CHMOD/no-keyword-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 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) -- cgit v0.12