Browse Source

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>
maint
René Scharfe 11 years ago committed by Junio C Hamano
parent
commit
65a3402f42
  1. 18
      t/t4209-log-pickaxe.sh

18
t/t4209-log-pickaxe.sh

@ -55,20 +55,10 @@ test_expect_success setup ' @@ -55,20 +55,10 @@ test_expect_success setup '
git rev-parse --verify HEAD >expect_second
'

test_expect_success 'log --grep' '
git log --grep=initial --format=%H >actual &&
test_cmp expect_initial actual
'

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_log expect_initial --grep initial
test_log expect_nomatch --grep InItial
test_log_icase expect_initial --grep InItial
test_log_icase expect_nomatch --grep initail

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

Loading…
Cancel
Save