summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/get_filename_component
Commit message (Collapse)AuthorAgeFilesLines
* get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semanticsBrad King2017-09-131-0/+11
| | | | | | | | | | | | | | | | | | | | The KWSys `SystemTools::SplitProgramFromArgs` implementation goes into an infinite loop when the value is just " " (a space). Since the "program path with unquoted spaces plus command-line arguments" operation it is trying to provide is poorly defined (string parsing should not depend on filesystem content), just stop using it. Instead consider the main two use cases the old approach tried to handle: * The value is the name or absolute path of a program with no quoting or escaping, but also no command-line arguments. In this case we can use the value as given with no parsing, and assume no arguments. * The value is a command-line string containing the program name/path plus arguments. In this case we now assume that the command line is properly quoted or escaped. Fixes: #17262
* Tests: Use upper-case drive letters in RunCMake.get_filename_componentBrad King2016-09-151-6/+6
| | | | | | | | With the most recent KWSys update, the "actual case" operation on Windows always upper-cases the drive letter now even for absolute paths that do not exist. Use an upper-case drive letter in the test so that it can tolerate this operation on Windows and the lack of this operation elsewhere.
* get_filename_component: Teach new BASE_DIR parameter.James Johnston2015-08-181-0/+33
| | | | | | 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.
* get_filename_component: Fix bug where CACHE was ignored.James Johnston2015-08-061-0/+32
| | | | | | | | | | 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>
* get_filename_component: Added initial tests for PROGRAM component.James Johnston2015-08-061-0/+12
| | | | | | | 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>
* get_filename_component: Tests now check for proper CACHE usage.James Johnston2015-08-062-1/+34
| | | | | | | | 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>
* Cygwin: Avoid legacy warnings in RunCMake.* testsBrad King2013-08-131-1/+1
| | | | | | 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.
* get_filename_component: Test ABSOLUTE of .. after root componentBrad King2013-06-041-0/+5
| | | | | Teach the RunCMake.get_filename_component test to verify that ".." does not remove the root filename component.
* get_filename_component: Add DIRECTORY option (#14091)Brad King2013-04-161-9/+10
| | | | | The name "PATH" is not precise so add equivalent option "DIRECTORY". Document the latter as preferred and the former as a legacy alias.
* get_filename_component: Add explicit unit testsBrad King2013-04-166-0/+45
Add test RunCMake.get_filename_component to cover cases of the command. Remove redundant coverage of these cases from the "complex" tests.