tests: fix negated test_i18ngrep calls
The helper function test_i18ngrep pretends that it found the expected results when it is running under GETTEXT_POISON. For this reason, it must not be used negated like so ! test_i18ngrep foo bar because the test case would fail under GETTEXT_POISON. The function offers a special syntax to test that a pattern is *not* found: test_i18ngrep ! foo bar Convert incorrect uses to this syntax. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
67de23ddb1
commit
41ca19b6a6
@ -52,15 +52,15 @@ do
|
||||
echo "*.java diff=$p" >.gitattributes &&
|
||||
test_expect_code 1 git diff --no-index \
|
||||
A.java B.java 2>msg &&
|
||||
! test_i18ngrep fatal msg &&
|
||||
! test_i18ngrep error msg
|
||||
test_i18ngrep ! fatal msg &&
|
||||
test_i18ngrep ! error msg
|
||||
'
|
||||
test_expect_success "builtin $p wordRegex pattern compiles" '
|
||||
echo "*.java diff=$p" >.gitattributes &&
|
||||
test_expect_code 1 git diff --no-index --word-diff \
|
||||
A.java B.java 2>msg &&
|
||||
! test_i18ngrep fatal msg &&
|
||||
! test_i18ngrep error msg
|
||||
test_i18ngrep ! fatal msg &&
|
||||
test_i18ngrep ! error msg
|
||||
'
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user