summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee9fb68)
raw | patch | inline | side by side (parent: ee9fb68)
author | Johannes Sixt <j6t@kdbg.org> | |
Fri, 13 Mar 2009 22:00:15 +0000 (23:00 +0100) | ||
committer | Johannes Sixt <j6t@kdbg.org> | |
Sun, 22 Mar 2009 16:49:52 +0000 (17:49 +0100) |
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>
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>
t/t3700-add.sh | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index dc17d9f7153d7bea4928503b79a5fdee58bce945..050de42ef4148a730c30520ccaad5e9871e536bd 100755 (executable)
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
! ( 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 f134e73566b5d98c4cc9d26fa8fccc62bdd49a32..b4b626e83774519fc4560239231756ca22df43fe 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
builtin pwd -W
}
# no POSIX permissions
+ # backslashes in pathspec are converted to '/'
;;
*)
test_set_prereq POSIXPERM
+ test_set_prereq BSLASHPSPEC
;;
esac