Skip to content

Commit

Permalink
Fix backslash escaping
Browse files Browse the repository at this point in the history
Now that we are using the add_test(NAME ... COMMAND ...) form,
backslash escaping works differently.  In my tests, backslashes
are not collapsed in that form.
  • Loading branch information
cxw42 committed Oct 20, 2019
1 parent 9ff938e commit e6fa523
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion filetree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ new_ec_test(windows_separator2 path_separator.in windows/separator2 "^[ \t\n\r]*

# Globs with backslash in it but should be considered as file name on Non-Windows system
if((NOT WIN32) AND (NOT CYGWIN))
new_ec_test(backslash_not_on_windows path_separator.in "windows\\\\separator2" "^key4=value4[ \t\n\r]*$")
new_ec_test(backslash_not_on_windows path_separator.in "windows\\separator2" "^key4=value4[ \t\n\r]*$")
endif()

new_ec_test(path_with_special_chars path_with_special_chars.in "path_with_special_[chars/test.a" "^key=value[ \t\n\r]*$")
Expand Down
2 changes: 1 addition & 1 deletion glob/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ new_ec_test(braces_escaped_brace3 braces.in f.txt "^closing=yes[ \t\n\r]*$")
# escaped backslash
new_ec_test(braces_escaped_backslash1 braces.in g.txt "^backslash=yes[ \t\n\r]*$")
if((NOT WIN32) AND (NOT CYGWIN)) # this case is impossible on Windows.
new_ec_test(braces_escaped_backslash2 braces.in \\\\.txt "^backslash=yes[ \t\n\r]*$")
new_ec_test(braces_escaped_backslash2 braces.in "\\.txt" "^backslash=yes[ \t\n\r]*$")
endif()
new_ec_test(braces_escaped_backslash3 braces.in i.txt "^backslash=yes[ \t\n\r]*$")

Expand Down

0 comments on commit e6fa523

Please sign in to comment.