Skip to content

Commit 65a3402

Browse files
rscharfegitster
authored andcommitted
t4209: use helper functions to test --grep
Also add tests for non-matching cases. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e7880fc commit 65a3402

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

t/t4209-log-pickaxe.sh

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,10 @@ test_expect_success setup '
5555
git rev-parse --verify HEAD >expect_second
5656
'
5757

58-
test_expect_success 'log --grep' '
59-
git log --grep=initial --format=%H >actual &&
60-
test_cmp expect_initial actual
61-
'
62-
63-
test_expect_success 'log --grep --regexp-ignore-case' '
64-
git log --regexp-ignore-case --grep=InItial --format=%H >actual &&
65-
test_cmp expect_initial actual
66-
'
67-
68-
test_expect_success 'log --grep -i' '
69-
git log -i --grep=InItial --format=%H >actual &&
70-
test_cmp expect_initial actual
71-
'
58+
test_log expect_initial --grep initial
59+
test_log expect_nomatch --grep InItial
60+
test_log_icase expect_initial --grep InItial
61+
test_log_icase expect_nomatch --grep initail
7262

7363
test_expect_success 'log --author --regexp-ignore-case' '
7464
git log --regexp-ignore-case --author=person --format=%H >actual &&

0 commit comments

Comments
 (0)