Commit Graph

4 Commits

Author SHA1 Message Date
Ashley Whetter 0205f882ae list: Add FILTER subcommand (#3986)
Create a `list(FILTER)` command to filter lists by regular expression.
2016-02-03 11:13:17 -05:00
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
Brad King d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests
Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32.  The warning appears on stderr
and breaks the expected output matching.
2013-08-13 09:50:15 -04:00
Brad King 05604eb9cb list: Handle errors on empty lists more gracefully (#13138)
Since commit ed1ea24c (Fix INSERT to allow inserting to empty list,
2006-05-15) the list command allows insertion into an empty list at
index 0.  Fix rejection of insertion at non-zero (negative) indices to
present an error message instead of crashing.

While at it, fix the error message of the GET and REMOVE_AT operations
when the list is empty to not present a bogus allowed range.

Add a "RunCMake.list" test to cover failure cases on empty lists.
2012-04-17 11:07:07 -04:00