t4209: use helper functions to test --grep

Also add tests for non-matching cases.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2014-03-22 18:15:54 +01:00 committed by Junio C Hamano
parent e7880fcd41
commit 65a3402f42

View File

@ -55,20 +55,10 @@ test_expect_success setup '
git rev-parse --verify HEAD >expect_second git rev-parse --verify HEAD >expect_second
' '
test_expect_success 'log --grep' ' test_log expect_initial --grep initial
git log --grep=initial --format=%H >actual && test_log expect_nomatch --grep InItial
test_cmp expect_initial actual test_log_icase expect_initial --grep InItial
' test_log_icase expect_nomatch --grep initail
test_expect_success 'log --grep --regexp-ignore-case' '
git log --regexp-ignore-case --grep=InItial --format=%H >actual &&
test_cmp expect_initial actual
'
test_expect_success 'log --grep -i' '
git log -i --grep=InItial --format=%H >actual &&
test_cmp expect_initial actual
'
test_expect_success 'log --author --regexp-ignore-case' ' test_expect_success 'log --author --regexp-ignore-case' '
git log --regexp-ignore-case --author=person --format=%H >actual && git log --regexp-ignore-case --author=person --format=%H >actual &&