summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-01-13 14:27:49 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-01-13 14:27:49 (GMT)
commit76f0bcdfb6e04f1f6089ea693d69b642bbf26e82 (patch)
tree08ee286265df549fac25cee13c2c590135ecfd8c /Tests
parent3ad1ee81445d4ce4388bcde7222a676725aebcd6 (diff)
downloadCMake-76f0bcdfb6e04f1f6089ea693d69b642bbf26e82.zip
CMake-76f0bcdfb6e04f1f6089ea693d69b642bbf26e82.tar.gz
CMake-76f0bcdfb6e04f1f6089ea693d69b642bbf26e82.tar.bz2
cmake_path: various updates
To follow discussions in #21385 and !5682: * Fix bug in cmCMakePath::IsSuffix() method * cmake_path(HASH) always normalized paths (NORMALIZE option removed)
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/cmake_path/HASH.cmake5
-rw-r--r--Tests/RunCMake/cmake_path/IS_PREFIX.cmake5
2 files changed, 5 insertions, 5 deletions
diff --git a/Tests/RunCMake/cmake_path/HASH.cmake b/Tests/RunCMake/cmake_path/HASH.cmake
index dfcf2b2..eb04f7f 100644
--- a/Tests/RunCMake/cmake_path/HASH.cmake
+++ b/Tests/RunCMake/cmake_path/HASH.cmake
@@ -14,11 +14,6 @@ set (path1 "a///b/c/../d")
cmake_path(HASH path1 hash1)
set (path2 "a/b////d")
cmake_path(HASH path2 hash2)
-if (hash1 STREQUAL hash2)
- list (APPEND errors "'hash values equal for '${path1}' and '${path2}'")
-endif()
-cmake_path(HASH path1 hash1 NORMALIZE)
-cmake_path(HASH path2 NORMALIZE hash2)
if (NOT hash1 STREQUAL hash2)
list (APPEND errors "'hash values not equal for '${path1}' and '${path2}'")
endif()
diff --git a/Tests/RunCMake/cmake_path/IS_PREFIX.cmake b/Tests/RunCMake/cmake_path/IS_PREFIX.cmake
index 53da93b..9160dab 100644
--- a/Tests/RunCMake/cmake_path/IS_PREFIX.cmake
+++ b/Tests/RunCMake/cmake_path/IS_PREFIX.cmake
@@ -18,5 +18,10 @@ if (NOT output)
list (APPEND errors "'${path} is not prefix of 'a/b/d/e'")
endif()
+set(path "/a/b/..")
+cmake_path(IS_PREFIX path "/a/c/../b" NORMALIZE output)
+if (NOT output)
+ list (APPEND errors "'${path} is not prefix of '/a/c/../b'")
+endif()
check_errors (IS_PREFIX ${errors})