@matheusbsbs / matheus-bagliano / commits / 6fd1106aa4
Fork 0

t3700: Skip a test with backslashes in pathspec

The test verifies that glob special characters can be escaped with backslashes. In particular, the string fo\[ou\]bar is given to git. On Windows, this does not work because backslashes are first of all directory separators, and first thing git does with a pathspec from the command line is to convert backslashes to forward slashes. Signed-off-by: Johannes Sixt <j6t@kdbg.org>

Johannes Sixt committed Mar 13, 2009 at 23:00 UTC 6fd1106aa4f921dd8e80895ed837072adfd665f1
2 files changed +3 -1
t/t3700-add.sh
+1 -1
@@ -222,7 +222,7 @@ test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' '
222 ! ( git ls-files foo1 | grep foo1 )
223 '
224
225 -test_expect_success 'git add '\''fo\[ou\]bar'\'' ignores foobar' '
225 +test_expect_success BSLASHPSPEC "git add 'fo\\[ou\\]bar' ignores foobar" '
226 git reset --hard &&
227 touch fo\[ou\]bar foobar &&
228 git add '\''fo\[ou\]bar'\'' &&
t/test-lib.sh
+2
@@ -688,9 +688,11 @@ case $(uname -s) in
688 builtin pwd -W
689 }
690 # no POSIX permissions
691 + # backslashes in pathspec are converted to '/'
692 ;;
693 *)
694 test_set_prereq POSIXPERM
695 + test_set_prereq BSLASHPSPEC
696 ;;
697 esac
698