tests: fix negated test_i18ngrep calls
authorJohannes Sixt <j6t@kdbg.org>
Wed, 13 Aug 2014 19:30:11 +0000 (21:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Aug 2014 20:12:06 +0000 (13:12 -0700)
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>
t/t4018-diff-funcname.sh
t/t9800-git-p4-basic.sh
t/t9807-git-p4-submit.sh
index 34591c23da82230f2412b46620f0d3a12188656f..1dbaa3864a568e09c30c174f771d593beeb1284d 100755 (executable)
@@ -52,15 +52,15 @@ do
                echo "*.java diff=$p" >.gitattributes &&
                test_expect_code 1 git diff --no-index \
                        A.java B.java 2>msg &&
                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_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
 
        '
 done
 
index 665607c9cbe5a07f83d4ae4c769060108bddbd9c..5b562122a16f231b00f7fb8090992f49d4950d82 100755 (executable)
@@ -145,7 +145,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
                test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
        ) &&
        cat errs &&
                test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
        ) &&
        cat errs &&
-       ! test_i18ngrep Traceback errs
+       test_i18ngrep ! Traceback errs
 '
 
 # Hide a file from p4d, make sure we catch its complaint.  This won't fail in
 '
 
 # Hide a file from p4d, make sure we catch its complaint.  This won't fail in
index 7fab2ed977a529c8754b9e5acd44b7f7c2cfaf2f..1f74a88385e827f7162256fafc22db5de3d41bf8 100755 (executable)
@@ -404,7 +404,7 @@ test_expect_success 'submit --prepare-p4-only' '
                git p4 submit --prepare-p4-only >out &&
                test_i18ngrep "prepared for submission" out &&
                test_i18ngrep "must be deleted" out &&
                git p4 submit --prepare-p4-only >out &&
                test_i18ngrep "prepared for submission" out &&
                test_i18ngrep "must be deleted" out &&
-               ! test_i18ngrep "everything below this line is just the diff" out
+               test_i18ngrep ! "everything below this line is just the diff" out
        ) &&
        (
                cd "$cli" &&
        ) &&
        (
                cd "$cli" &&