summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/separate_arguments/UnixCommand.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/separate_arguments/UnixCommand.cmake')
-rw-r--r--Tests/RunCMake/separate_arguments/UnixCommand.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/separate_arguments/UnixCommand.cmake b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
new file mode 100644
index 0000000..0b5767a
--- /dev/null
+++ b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
@@ -0,0 +1,8 @@
+set(unix_cmd "a \"b c\" 'd e' \";\" \\ \\'\\\" '\\'' \"\\\"\"")
+set(unix_exp "a;b c;d e;\;; '\";';\"")
+separate_arguments(unix_out UNIX_COMMAND "${unix_cmd}")
+
+if(NOT "${unix_out}" STREQUAL "${unix_exp}")
+ message(FATAL_ERROR "separate_arguments unix-style failed. "
+ "Expected\n [${unix_exp}]\nbut got\n [${unix_out}]\n")
+endif()