diff options
author | Shane Parris <shane.lee.parris@gmail.com> | 2018-02-13 17:40:55 (GMT) |
---|---|---|
committer | Shane Parris <shane.lee.parris@gmail.com> | 2018-02-28 14:34:47 (GMT) |
commit | 915b71010c1c48ccd8e84df825579dd5595afc9a (patch) | |
tree | e9a3869c684a2e2fefa7432f3fdcec9d5acaef9e /Tests/RunCMake/file | |
parent | fcaa134c6c36e2de8d454a3d5132dee19f9f7b95 (diff) | |
download | CMake-915b71010c1c48ccd8e84df825579dd5595afc9a.zip CMake-915b71010c1c48ccd8e84df825579dd5595afc9a.tar.gz CMake-915b71010c1c48ccd8e84df825579dd5595afc9a.tar.bz2 |
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 0000000..d00491f --- /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 0000000..af3cb2e --- /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 0000000..6d467a0 --- /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 0000000..d00491f --- /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 0000000..30cec89 --- /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 0000000..a555881 --- /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 0000000..d00491f --- /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 0000000..ee6cb0b --- /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 0000000..d00491f --- /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 0000000..9c66631 --- /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 0000000..7b2d404 --- /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 0000000..d00491f --- /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 0000000..d0b2bff --- /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 0000000..5e5ce92 --- /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 9a72333..27305d0 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) |