Commit Graph

8 Commits

Author SHA1 Message Date
James Johnston e89ea3d190 get_filename_component: Teach new BASE_DIR parameter.
In the get_filename_component command, add a new BASE_DIR parameter to
use with the ABSOLUTE and REALPATH options.  This will be used when
finding an absolute path from a relative path.
2015-08-17 23:55:38 -04:00
James Johnston d035e9687a get_filename_component: Fix bug where CACHE was ignored.
If PROGRAM_ARGS is provided to get_filename_component, fix bug where the
command failed to honor the CACHE argument.

Added test cases to RunCMake.get_filename_component that fail when the
bug is not fixed to prevent regressions.

Signed-off-by: James Johnston <johnstonj.public@codenest.com>
2015-08-06 17:53:34 +00:00
James Johnston 38ed5866ed get_filename_component: Added initial tests for PROGRAM component.
The RunCMake.get_filename_component test now tests basic functionality
of the PROGRAM component argument of get_filename_component.

Signed-off-by: James Johnston <johnstonj.public@codenest.com>
2015-08-06 17:53:25 +00:00
James Johnston 772ca69f80 get_filename_component: Tests now check for proper CACHE usage.
The RunCMake.get_filename_component test was improved to assert that
each test variable outputted by get_filename_component is or is not
a cache variable, as per the particular test.

Signed-off-by: James Johnston <johnstonj.public@codenest.com>
2015-08-06 17:53:12 +00: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 d26800bc40 get_filename_component: Test ABSOLUTE of .. after root component
Teach the RunCMake.get_filename_component test to verify that ".." does
not remove the root filename component.
2013-06-04 09:09:22 -04:00
Brad King 7d1590e6f9 get_filename_component: Add DIRECTORY option (#14091)
The name "PATH" is not precise so add equivalent option "DIRECTORY".
Document the latter as preferred and the former as a legacy alias.
2013-04-16 09:37:37 -04:00
Brad King ec1ba9b0ae get_filename_component: Add explicit unit tests
Add test RunCMake.get_filename_component to cover cases of the command.
Remove redundant coverage of these cases from the "complex" tests.
2013-04-16 09:35:29 -04:00