summaryrefslogtreecommitdiff
path: root/t/t7002-grep.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-09-13 08:24:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-09-13 08:24:20 (GMT)
commit45c58ba00a9c4e31e94997b59fd8112f962fa222 (patch)
tree74f2d92d9560adb88aa065c1003522e4a39388bb /t/t7002-grep.sh
parent59b8d38f6e4f19b93c5dc4493ab11706acd101b5 (diff)
parent493b7a08d80535def6756b281873e4e0937ba6c2 (diff)
downloadgit-45c58ba00a9c4e31e94997b59fd8112f962fa222.zip
git-45c58ba00a9c4e31e94997b59fd8112f962fa222.tar.gz
git-45c58ba00a9c4e31e94997b59fd8112f962fa222.tar.bz2
Merge branch 'cb/maint-1.6.3-grep-relative-up' into maint
* cb/maint-1.6.3-grep-relative-up: grep: accept relative paths outside current working directory grep: fix exit status if external_grep() punts Conflicts: t/t7002-grep.sh
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 b13aa7e..6ca11d7 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -279,4 +279,21 @@ test_expect_success 'grep -p -B5' '
test_cmp expected actual
'
+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