Commit Graph

16 Commits

Author SHA1 Message Date
Brad King e5ca59b456 Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure.  This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
2015-07-14 10:25:38 -04:00
Modestas Vainius c9b75dcd73 Fix test failures caused by regexp-sensitive characters in the build paths
Checkout [1] as an example of the test failures. In that particular cases, the
failures is caused by the plus sign in the path being pass unescaped
(buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp.

In addition to failures in the log, the following new tests also fail in 2.8.11:

  243 - CTestTestMemcheckUnknown (Failed)
  244 - CTestTestMemcheckUnknownQuoted (Failed)
  248 - CTestTestMemcheckDummyValgrindFailPre (Failed)
  249 - CTestTestMemcheckDummyValgrindFailPost (Failed)
  250 - CTestTestMemcheckDummyPurify (Failed)
  251 - CTestTestMemcheckDummyBC (Failed)
  253 - CMake.List (Failed)

[1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896
2013-06-03 16:51:21 +02:00
Rolf Eike Beer 56125a3f36 list: add tests for CMP0007 behavior 2012-11-02 17:10:07 +01:00
Petr Kmoch 07251a8ea5 Consolidate list() argument count testing
Move test for list() argument count >= 2 to InitialPass().
2012-11-02 17:09:55 +01:00
Petr Kmoch 1b078c304d Add tests for list() invalid arguments
Add tests for error reporting when list() arguments are invalid.
2012-11-02 17:08:49 +01:00
Petr Kmoch f560977540 Add tests for list() argument count
Add test for error reporting when list() subcommands have wrong number of
arguments.
2012-11-02 17:08:44 +01:00
Rolf Eike Beer 08c71acc87 CMake.List test: explicitely test with lists containing only an empty string 2012-08-15 23:05:05 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Sebastien Barre f64d3d0b77 ENH: add REMOVE_DUPLICATES subcommand to LIST command (and test). Remove duplicates from a list (keep the ordering) 2008-03-12 17:02:10 -04:00
Alexander Neundorf 2f23ecdb8a ENH: change LIST(CONTAINS ...) TO LIST(FIND ...), which returns the index
and which is more useful, because then you can also access the item behind
the one you were looking, useful for writing macros with optional keywords
with parameters

Alex
2007-08-15 10:26:50 -04:00
Alexander Neundorf c8010cd7fb ENH: add LIST(CONTAINS ...) patch from "Miguel A. Figueroa-Villanueva, miguelf (AT) ieee.org
added tests for LIST(CONTAINS, SORT, REVERSE)

Alex
2007-07-12 11:56:45 -04:00
Andy Cedilnik ed1ea24cef ENH: Fix INSERT to allow inserting to empty list 2006-05-15 10:14:16 -04:00
Andy Cedilnik cb2a9be622 ENH: Change REMOVE and REMOVE_ITEM to REMOVE_AT and REMOVE_ITEM 2006-05-15 09:57:49 -04:00
Andy Cedilnik 3b92585cf0 ENH: Remove some errors, fix append to work on nonexisting lists 2006-05-15 09:25:06 -04:00
Andy Cedilnik f87271d0ea ENH: Add initial implementation of the list command 2006-02-10 14:11:12 -05:00