Skip to content

Commit

Permalink
t7810: do not abbreviate --no-exclude-standard nor --invert-match
Browse files Browse the repository at this point in the history
This script used abbreviated options, which is unnecessarily fragile.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
dscho authored and gitster committed Apr 2, 2019
1 parent f927ae6 commit 7076e44
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions t/t7810-grep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,33 +119,33 @@ do
test_cmp expected actual
'

test_expect_success "grep -w $L (with --column, --invert)" '
test_expect_success "grep -w $L (with --column, --invert-match)" '
{
echo ${HC}file:1:foo mmap bar
echo ${HC}file:1:foo_mmap bar
echo ${HC}file:1:foo_mmap bar mmap
echo ${HC}file:1:foo mmap bar_mmap
} >expected &&
git grep --column --invert -w -e baz $H -- file >actual &&
git grep --column --invert-match -w -e baz $H -- file >actual &&
test_cmp expected actual
'

test_expect_success "grep $L (with --column, --invert, extended OR)" '
test_expect_success "grep $L (with --column, --invert-match, extended OR)" '
{
echo ${HC}hello_world:6:HeLLo_world
} >expected &&
git grep --column --invert -e ll --or --not -e _ $H -- hello_world \
git grep --column --invert-match -e ll --or --not -e _ $H -- hello_world \
>actual &&
test_cmp expected actual
'

test_expect_success "grep $L (with --column, --invert, extended AND)" '
test_expect_success "grep $L (with --column, --invert-match, extended AND)" '
{
echo ${HC}hello_world:3:Hello world
echo ${HC}hello_world:3:Hello_world
echo ${HC}hello_world:6:HeLLo_world
} >expected &&
git grep --column --invert --not -e _ --and --not -e ll $H -- hello_world \
git grep --column --invert-match --not -e _ --and --not -e ll $H -- hello_world \
>actual &&
test_cmp expected actual
'
Expand Down Expand Up @@ -1010,7 +1010,7 @@ test_expect_success 'outside of git repository' '
echo ".gitignore:.*o*" &&
cat ../expect.full
} >../expect.with.ignored &&
git grep --no-index --no-exclude o >../actual.full &&
git grep --no-index --no-exclude-standard o >../actual.full &&
test_cmp ../expect.with.ignored ../actual.full
)
'
Expand Down Expand Up @@ -1051,7 +1051,7 @@ test_expect_success 'outside of git repository with fallbackToNoIndex' '
echo ".gitignore:.*o*" &&
cat ../expect.full
} >../expect.with.ignored &&
git -c grep.fallbackToNoIndex grep --no-exclude o >../actual.full &&
git -c grep.fallbackToNoIndex grep --no-exclude-standard o >../actual.full &&
test_cmp ../expect.with.ignored ../actual.full
)
'
Expand Down

0 comments on commit 7076e44

Please sign in to comment.