Tests: Use upper-case drive letters in RunCMake.get_filename_component

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.
This commit is contained in:
Brad King 2016-09-15 08:32:43 -04:00
parent 04d94fbe92
commit de1493176b
1 changed files with 6 additions and 6 deletions

View File

@ -19,12 +19,12 @@ foreach(c DIRECTORY NAME EXT NAME_WE PATH)
endforeach()
# Test Windows paths with DIRECTORY component and an absolute Windows path.
get_filename_component(test_slashes "c:\\path\\to\\filename.ext.in" DIRECTORY)
check("DIRECTORY from backslashes" "${test_slashes}" "c:/path/to")
get_filename_component(test_slashes "C:\\path\\to\\filename.ext.in" DIRECTORY)
check("DIRECTORY from backslashes" "${test_slashes}" "C:/path/to")
list(APPEND non_cache_vars test_slashes)
get_filename_component(test_winroot "c:\\filename.ext.in" DIRECTORY)
check("DIRECTORY in windows root" "${test_winroot}" "c:/")
get_filename_component(test_winroot "C:\\filename.ext.in" DIRECTORY)
check("DIRECTORY in windows root" "${test_winroot}" "C:/")
list(APPEND non_cache_vars test_winroot)
# Test finding absolute paths.
@ -33,8 +33,8 @@ check("ABSOLUTE" "${test_absolute}" "/path/to/filename.ext.in")
get_filename_component(test_absolute "/../path/to/filename.ext.in" ABSOLUTE)
check("ABSOLUTE .. in root" "${test_absolute}" "/path/to/filename.ext.in")
get_filename_component(test_absolute "c:/../path/to/filename.ext.in" ABSOLUTE)
check("ABSOLUTE .. in windows root" "${test_absolute}" "c:/path/to/filename.ext.in")
get_filename_component(test_absolute "C:/../path/to/filename.ext.in" ABSOLUTE)
check("ABSOLUTE .. in windows root" "${test_absolute}" "C:/path/to/filename.ext.in")
list(APPEND non_cache_vars test_absolute)