]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t7002-grep.sh
Merge branch 'maint-1.6.1' into maint
[git.git] / t / t7002-grep.sh
index 18fe6f2d576d35706b1a712292b58155680cc9dc..b81593780a2a6adaf34bb10293b607e3a303cfcd 100755 (executable)
@@ -26,6 +26,10 @@ test_expect_success setup '
        git commit -m initial
 '
 
+test_expect_success 'grep should not segfault with a bad input' '
+       test_must_fail git grep "("
+'
+
 for H in HEAD ''
 do
        case "$H" in
@@ -161,7 +165,14 @@ test_expect_success 'log grep (6)' '
        git log --author=-0700  --pretty=tformat:%s >actual &&
        >expect &&
        test_cmp expect actual
+'
 
+test_expect_success 'grep with CE_VALID file' '
+       git update-index --assume-unchanged t/t &&
+       rm t/t &&
+       test "$(git grep --no-ext-grep t)" = "t/t:test" &&
+       git update-index --no-assume-unchanged t/t &&
+       git checkout t/t
 '
 
 test_done