summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/get_filename_component
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-03 15:17:20 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-04 13:09:22 (GMT)
commitd26800bc40a103d90366da176ad68ed92f21daab (patch)
tree3fbdb40b9c1e206458dd9b368f50f0a82ef4a674 /Tests/RunCMake/get_filename_component
parentc91e88d0e15f38616284f12fc0f2152ac6c0562c (diff)
downloadCMake-d26800bc40a103d90366da176ad68ed92f21daab.zip
CMake-d26800bc40a103d90366da176ad68ed92f21daab.tar.gz
CMake-d26800bc40a103d90366da176ad68ed92f21daab.tar.bz2
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.
Diffstat (limited to 'Tests/RunCMake/get_filename_component')
-rw-r--r--Tests/RunCMake/get_filename_component/KnownComponents.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.cmake b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
index a4ef8ff..9d7cf90 100644
--- a/Tests/RunCMake/get_filename_component/KnownComponents.cmake
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
@@ -24,6 +24,11 @@ check("DIRECTORY in windows root" "${test_winroot}" "c:/")
get_filename_component(test_absolute "/path/to/a/../filename.ext.in" ABSOLUTE)
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_cache "/path/to/filename.ext.in" DIRECTORY CACHE)
check("CACHE 1" "${test_cache}" "/path/to")
get_filename_component(test_cache "/path/to/other/filename.ext.in" DIRECTORY CACHE)