summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/cmake_path/CONCAT.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/cmake_path/CONCAT.cmake')
-rw-r--r--Tests/RunCMake/cmake_path/CONCAT.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/cmake_path/CONCAT.cmake b/Tests/RunCMake/cmake_path/CONCAT.cmake
new file mode 100644
index 0000000..62b5eb0
--- /dev/null
+++ b/Tests/RunCMake/cmake_path/CONCAT.cmake
@@ -0,0 +1,20 @@
+
+include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
+unset (errors)
+
+set (path "/a/b")
+cmake_path (CONCAT path "cd")
+if (NOT path STREQUAL "/a/bcd")
+ list (APPEND errors "'${path}' instead of 'a/bcd'")
+endif()
+
+set (path "/a/b")
+cmake_path (CONCAT path "cd" "ef" OUTPUT_VARIABLE output)
+if (NOT path STREQUAL "/a/b")
+ list (APPEND errors "input changed unexpectedly")
+endif()
+if (NOT output STREQUAL "/a/bcdef")
+ list (APPEND errors "'${output}' instead of 'a/bcdef'")
+endif()
+
+check_errors (CONCAT ${errors})