From: Johannes Sixt Date: Fri, 13 Mar 2009 22:00:15 +0000 (+0100) Subject: t3700: Skip a test with backslashes in pathspec X-Git-Tag: v1.6.3-rc0~93^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6fd1106aa4f921dd8e80895ed837072adfd665f1;p=git.git 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 --- diff --git a/t/t3700-add.sh b/t/t3700-add.sh index dc17d9f71..050de42ef 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -222,7 +222,7 @@ test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' ' ! ( git ls-files foo1 | grep foo1 ) ' -test_expect_success 'git add '\''fo\[ou\]bar'\'' ignores foobar' ' +test_expect_success BSLASHPSPEC "git add 'fo\\[ou\\]bar' ignores foobar" ' git reset --hard && touch fo\[ou\]bar foobar && git add '\''fo\[ou\]bar'\'' && diff --git a/t/test-lib.sh b/t/test-lib.sh index f134e7356..b4b626e83 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -688,9 +688,11 @@ case $(uname -s) in builtin pwd -W } # no POSIX permissions + # backslashes in pathspec are converted to '/' ;; *) test_set_prereq POSIXPERM + test_set_prereq BSLASHPSPEC ;; esac