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