summaryrefslogtreecommitdiff
path: root/t/t7811-grep-open.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7811-grep-open.sh')
-rwxr-xr-xt/t7811-grep-open.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
index a98785d..fe38d88 100755
--- a/t/t7811-grep-open.sh
+++ b/t/t7811-grep-open.sh
@@ -3,6 +3,7 @@
test_description='git grep --open-files-in-pager
'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-pager.sh
unset PAGER GIT_PAGER
@@ -62,7 +63,7 @@ test_expect_success SIMPLEPAGER 'git grep -O' '
test_expect_success 'git grep -O --cached' '
test_must_fail git grep --cached -O GREP_PATTERN >out 2>msg &&
- test_i18ngrep open-files-in-pager msg
+ test_grep open-files-in-pager msg
'
test_expect_success 'git grep -O --no-index' '
@@ -114,8 +115,8 @@ test_expect_success 'modified file' '
unrelated
EOF
+ test_when_finished "git reset --hard" &&
echo "enum grep_pat_token" >unrelated &&
- test_when_finished "git checkout HEAD unrelated" &&
GIT_PAGER=./less git grep -F -O "enum grep_pat_token" >out &&
test_cmp expect actual &&
test_must_be_empty out