Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-28 00:44:25 +0400
committerJunio C Hamano <gitster@pobox.com>2009-06-28 00:44:25 +0400
commit2dc7f40d4424f66e1324a1600de3fcdd115ab07f (patch)
tree6680ff45aeb60a73e9c6bba6d0c779473e6f0e35 /t
parent3f721d1d6d6e6e55dbb5bfcb0e09346478adbb72 (diff)
parent1bed73c64a354248d6b342e58df257e8233bcbd2 (diff)
Merge branch 'maint'
* maint: gitweb/README: fix AliasMatch in example Test grep --and/--or/--not Test git archive --remote fread does not return negative on error
Diffstat (limited to 't')
-rwxr-xr-xt/t5000-tar-tree.sh4
-rwxr-xr-xt/t7002-grep.sh30
2 files changed, 34 insertions, 0 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index abb41b07ef..5f84b18fa5 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -94,6 +94,10 @@ test_expect_success 'git archive with --output' \
'git archive --output=b4.tar HEAD &&
test_cmp b.tar b4.tar'
+test_expect_success 'git archive --remote' \
+ 'git archive --remote=. HEAD >b5.tar &&
+ test_cmp b.tar b5.tar'
+
test_expect_success \
'validate file modification time' \
'mkdir extract &&
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index f275af8240..7868af8f18 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -125,6 +125,36 @@ do
done
+cat >expected <<EOF
+file:foo mmap bar_mmap
+EOF
+
+test_expect_success 'grep -e A --and -e B' '
+ git grep -e "foo mmap" --and -e bar_mmap >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<EOF
+file:foo_mmap bar mmap
+file:foo_mmap bar mmap baz
+EOF
+
+
+test_expect_success 'grep ( -e A --or -e B ) --and -e B' '
+ git grep \( -e foo_ --or -e baz \) \
+ --and -e " mmap" >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<EOF
+file:foo mmap bar
+EOF
+
+test_expect_success 'grep -e A --and --not -e B' '
+ git grep -e "foo mmap" --and --not -e bar_mmap >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'log grep setup' '
echo a >>file &&
test_tick &&