File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 125125
126126done
127127
128+ cat > expected << EOF
129+ file:foo mmap bar_mmap
130+ EOF
131+
132+ test_expect_success ' grep -e A --and -e B' '
133+ git grep -e "foo mmap" --and -e bar_mmap >actual &&
134+ test_cmp expected actual
135+ '
136+
137+ cat > expected << EOF
138+ file:foo_mmap bar mmap
139+ file:foo_mmap bar mmap baz
140+ EOF
141+
142+
143+ test_expect_success ' grep ( -e A --or -e B ) --and -e B' '
144+ git grep \( -e foo_ --or -e baz \) \
145+ --and -e " mmap" >actual &&
146+ test_cmp expected actual
147+ '
148+
149+ cat > expected << EOF
150+ file:foo mmap bar
151+ EOF
152+
153+ test_expect_success ' grep -e A --and --not -e B' '
154+ git grep -e "foo mmap" --and --not -e bar_mmap >actual &&
155+ test_cmp expected actual
156+ '
157+
128158test_expect_success ' log grep setup' '
129159 echo a >>file &&
130160 test_tick &&
You can’t perform that action at this time.
0 commit comments