diff options
author | Shane Parris <shane.lee.parris@gmail.com> | 2018-02-13 12:40:55 -0500 |
---|---|---|
committer | Shane Parris <shane.lee.parris@gmail.com> | 2018-02-28 09:34:47 -0500 |
commit | 915b71010c1c48ccd8e84df825579dd5595afc9a (patch) | |
tree | e9a3869c684a2e2fefa7432f3fdcec9d5acaef9e /Tests/RunCMake/file | |
parent | fcaa134c6c36e2de8d454a3d5132dee19f9f7b95 (diff) | |
download | cmake-915b71010c1c48ccd8e84df825579dd5595afc9a.tar.gz |
Enhance RunCMake test coverage for file(GLOB)
Diffstat (limited to 'Tests/RunCMake/file')
15 files changed, 35 insertions, 2 deletions
diff --git a/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-result.txt b/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-stderr.txt b/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-stderr.txt new file mode 100644 index 0000000000..af3cb2e5a3 --- /dev/null +++ b/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GLOB-error-FOLLOW_SYMLINKS\.cmake:[0-9]+ \(file\): + file FOLLOW_SYMLINKS is not a valid parameter for GLOB\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS.cmake b/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS.cmake new file mode 100644 index 0000000000..6d467a0c67 --- /dev/null +++ b/Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS.cmake @@ -0,0 +1 @@ +file(GLOB CONTENT_LIST FOLLOW_SYMLINKS) diff --git a/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg-result.txt b/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg-stderr.txt b/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg-stderr.txt new file mode 100644 index 0000000000..30cec899b9 --- /dev/null +++ b/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GLOB-error-RELATIVE-no-arg\.cmake:[0-9]+ \(file\): + file GLOB requires a directory after the RELATIVE tag\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg.cmake b/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg.cmake new file mode 100644 index 0000000000..a555881269 --- /dev/null +++ b/Tests/RunCMake/file/GLOB-error-RELATIVE-no-arg.cmake @@ -0,0 +1 @@ +file(GLOB CONTENT_LIST RELATIVE) diff --git a/Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-result.txt b/Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-stderr.txt b/Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-stderr.txt new file mode 100644 index 0000000000..ee6cb0b58b --- /dev/null +++ b/Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GLOB-noexp-LIST_DIRECTORIES\.cmake:[0-9]+ \(file\): + file GLOB requires a glob expression after the bool\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/GLOB-noexp-RELATIVE-result.txt b/Tests/RunCMake/file/GLOB-noexp-RELATIVE-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/file/GLOB-noexp-RELATIVE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/GLOB-noexp-RELATIVE-stderr.txt b/Tests/RunCMake/file/GLOB-noexp-RELATIVE-stderr.txt new file mode 100644 index 0000000000..9c666312d3 --- /dev/null +++ b/Tests/RunCMake/file/GLOB-noexp-RELATIVE-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GLOB-noexp-RELATIVE\.cmake:[0-9]+ \(file\): + file GLOB requires a glob expression after the directory\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/GLOB-noexp-RELATIVE.cmake b/Tests/RunCMake/file/GLOB-noexp-RELATIVE.cmake new file mode 100644 index 0000000000..7b2d404204 --- /dev/null +++ b/Tests/RunCMake/file/GLOB-noexp-RELATIVE.cmake @@ -0,0 +1 @@ +file(GLOB CONTENT_LIST RELATIVE "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-result.txt b/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-stderr.txt b/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-stderr.txt new file mode 100644 index 0000000000..d0b2bffa1b --- /dev/null +++ b/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at GLOB_RECURSE-noexp-FOLLOW_SYMLINKS\.cmake:[0-9]+ \(file\): + file GLOB_RECURSE requires a glob expression after FOLLOW_SYMLINKS\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS.cmake b/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS.cmake new file mode 100644 index 0000000000..5e5ce92883 --- /dev/null +++ b/Tests/RunCMake/file/GLOB_RECURSE-noexp-FOLLOW_SYMLINKS.cmake @@ -0,0 +1 @@ +file(GLOB_RECURSE CONTENT_LIST FOLLOW_SYMLINKS) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index 9a72333aa9..27305d08f6 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -35,11 +35,15 @@ run_cmake(LOCK-lowercase) run_cmake(READ_ELF) run_cmake(GLOB) run_cmake(GLOB_RECURSE) -# test is valid both for GLOB and GLOB_RECURSE +run_cmake(GLOB_RECURSE-noexp-FOLLOW_SYMLINKS) + +# tests are valid both for GLOB and GLOB_RECURSE +run_cmake(GLOB-error-FOLLOW_SYMLINKS) run_cmake(GLOB-error-LIST_DIRECTORIES-not-boolean) -# test is valid both for GLOB and GLOB_RECURSE run_cmake(GLOB-error-LIST_DIRECTORIES-no-arg) +run_cmake(GLOB-error-RELATIVE-no-arg) run_cmake(GLOB-noexp-LIST_DIRECTORIES) +run_cmake(GLOB-noexp-RELATIVE) if(NOT WIN32 OR CYGWIN) run_cmake(GLOB_RECURSE-cyclic-recursion) |