X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3700-add.sh;h=2ac93a346d016c65614f2bf6142049e7bdc39bd1;hb=1500f7bc1366e71edb7e8a31f3cf5614e9591cc2;hp=e83fa1f6894dd13eb11cae6afb8ecbd3dcb999db;hpb=547905f8cd2a04b3e1117f00025b60f81aa60f47;p=git.git diff --git a/t/t3700-add.sh b/t/t3700-add.sh index e83fa1f68..2ac93a346 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -85,12 +85,12 @@ test_expect_success '.gitignore is honored' ' ' test_expect_success 'error out when attempting to add ignored ones without -f' ' - ! git add a.?? && + test_must_fail git add a.?? && ! (git ls-files | grep "\\.ig") ' test_expect_success 'error out when attempting to add ignored ones without -f' ' - ! git add d.?? && + test_must_fail git add d.?? && ! (git ls-files | grep "\\.ig") ' @@ -222,4 +222,12 @@ test_expect_success 'git add (add.ignore-errors = false)' ' ! ( git ls-files foo1 | grep foo1 ) ' +test_expect_success 'git add '\''fo\[ou\]bar'\'' ignores foobar' ' + git reset --hard && + touch fo\[ou\]bar foobar && + git add '\''fo\[ou\]bar'\'' && + git ls-files fo\[ou\]bar | grep -F fo\[ou\]bar && + ! ( git ls-files foobar | grep foobar ) +' + test_done