* [PATCH 1/2] Test git archive --remote
@ 2009-06-27 18:47 Thomas Rast
2009-06-27 18:47 ` [PATCH 2/2] Test grep --and/--or/--not Thomas Rast
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Rast @ 2009-06-27 18:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Add a small test case for git archive --remote (and thus
git-upload-archive), which so far went untested.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
This and the next patch are some fairly low-hanging fruit picked from
looking at 'make coverage'.
t/t5000-tar-tree.sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index abb41b0..5f84b18 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 &&
--
1.6.3.3.423.ga0175
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 2/2] Test grep --and/--or/--not
2009-06-27 18:47 [PATCH 1/2] Test git archive --remote Thomas Rast
@ 2009-06-27 18:47 ` Thomas Rast
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Rast @ 2009-06-27 18:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
t/t7002-grep.sh | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index f275af8..7868af8 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 &&
--
1.6.3.3.423.ga0175
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-27 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27 18:47 [PATCH 1/2] Test git archive --remote Thomas Rast
2009-06-27 18:47 ` [PATCH 2/2] Test grep --and/--or/--not Thomas Rast
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).