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>
Johannes Sixt committed
Aug 13, 2014 at 21:30 UTC
41ca19b6a6ca5ad6fea246bd400717c16b80b32c
3 files changed
+6
-6
t/t4018-diff-funcname.sh
+4
-4
@@ -52,15 +52,15 @@ do
52
echo "*.java diff=$p" >.gitattributes &&
53
test_expect_code 1 git diff --no-index \
54
A.java B.java 2>msg &&
55
- ! test_i18ngrep fatal msg &&
56
- ! test_i18ngrep error msg
55
+ test_i18ngrep ! fatal msg &&
56
+ test_i18ngrep ! error msg
57
'
58
test_expect_success "builtin $p wordRegex pattern compiles" '
59
echo "*.java diff=$p" >.gitattributes &&
60
test_expect_code 1 git diff --no-index --word-diff \
61
A.java B.java 2>msg &&
62
- ! test_i18ngrep fatal msg &&
63
- ! test_i18ngrep error msg
62
+ test_i18ngrep ! fatal msg &&
63
+ test_i18ngrep ! error msg
64
'
65
done
66
t/t9800-git-p4-basic.sh
+1
-1
@@ -145,7 +145,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
145
test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
146
) &&
147
cat errs &&
148
- ! test_i18ngrep Traceback errs
148
+ test_i18ngrep ! Traceback errs
149
'
150
151
# Hide a file from p4d, make sure we catch its complaint. This won't fail in
t/t9807-git-p4-submit.sh
+1
-1
@@ -404,7 +404,7 @@ test_expect_success 'submit --prepare-p4-only' '
404
git p4 submit --prepare-p4-only >out &&
405
test_i18ngrep "prepared for submission" out &&
406
test_i18ngrep "must be deleted" out &&
407
- ! test_i18ngrep "everything below this line is just the diff" out
407
+ test_i18ngrep ! "everything below this line is just the diff" out
408
) &&
409
(
410
cd "$cli" &&