summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4813926)
raw | patch | inline | side by side (parent: 4813926)
author | Thomas Rast <trast@student.ethz.ch> | |
Sat, 27 Jun 2009 18:47:44 +0000 (20:47 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 27 Jun 2009 20:15:41 +0000 (13:15 -0700) |
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7002-grep.sh | patch | blob | history |
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index f275af82403dc0f1de4c584074c0eb63e61a6704..7868af8f1896e621b98a2ae9b71492a68a96e584 100755 (executable)
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
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 &&