aboutsummaryrefslogtreecommitdiff
path: root/t/t7002-grep.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7002-grep.sh')
-rwxr-xr-xt/t7002-grep.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 7868af8f1..fe87834fb 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -212,4 +212,21 @@ test_expect_success 'grep with CE_VALID file' '
git checkout t/t
'
+test_expect_success 'grep from a subdirectory to search wider area (1)' '
+ mkdir -p s &&
+ (
+ cd s && git grep "x x x" ..
+ )
+'
+
+test_expect_success 'grep from a subdirectory to search wider area (2)' '
+ mkdir -p s &&
+ (
+ cd s || exit 1
+ ( git grep xxyyzz .. >out ; echo $? >status )
+ ! test -s out &&
+ test 1 = $(cat status)
+ )
+'
+
test_done