summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-14 19:01:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-14 19:01:03 (GMT)
commitd92a0156607778422d54abef610ecbbf17ca9f12 (patch)
treec16f34c20a0c721af98131c3a1416e0fe460d4a4 /t
parent787aa97f217eb97827205271daba6d95c80b9049 (diff)
parent51b74b57aec50cf59f40aa1ec85ae72f9a35b32f (diff)
downloadgit-d92a0156607778422d54abef610ecbbf17ca9f12.zip
git-d92a0156607778422d54abef610ecbbf17ca9f12.tar.gz
git-d92a0156607778422d54abef610ecbbf17ca9f12.tar.bz2
Merge branch 'rj/test-i18ngrep'
Test updates. * rj/test-i18ngrep: t5536: simplify checking of messages output to stderr t4151: consolidate multiple calls to test_i18ngrep
Diffstat (limited to 't')
-rwxr-xr-xt/t4151-am-abort.sh5
-rwxr-xr-xt/t5536-fetch-conflicts.sh22
2 files changed, 6 insertions, 21 deletions
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index 9473c27..1643278 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -46,9 +46,8 @@ do
test_expect_success "am$with3 --skip continue after failed am$with3" '
test_must_fail git am$with3 --skip >output &&
- test_i18ngrep "^Applying" output >output.applying &&
- test_i18ngrep "^Applying: 6$" output.applying &&
- test_i18ncmp file-2-expect file-2 &&
+ test_i18ngrep "^Applying: 6$" output &&
+ test_cmp file-2-expect file-2 &&
test ! -f .git/MERGE_RR
'
diff --git a/t/t5536-fetch-conflicts.sh b/t/t5536-fetch-conflicts.sh
index 644736b..91f28c2 100755
--- a/t/t5536-fetch-conflicts.sh
+++ b/t/t5536-fetch-conflicts.sh
@@ -18,14 +18,6 @@ setup_repository () {
)
}
-verify_stderr () {
- cat >expected &&
- # We're not interested in the error
- # "fatal: The remote end hung up unexpectedly":
- test_i18ngrep -E '^(fatal|warning):' error | grep -v 'hung up' >actual | sort &&
- test_i18ncmp expected actual
-}
-
test_expect_success 'setup' '
git commit --allow-empty -m "Initial" &&
git branch branch1 &&
@@ -48,9 +40,7 @@ test_expect_success 'fetch conflict: config vs. config' '
"+refs/heads/branch2:refs/remotes/origin/branch1" && (
cd ccc &&
test_must_fail git fetch origin 2>error &&
- verify_stderr <<-\EOF
- fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
- EOF
+ test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
)
'
@@ -77,9 +67,7 @@ test_expect_success 'fetch conflict: arg vs. arg' '
test_must_fail git fetch origin \
refs/heads/*:refs/remotes/origin/* \
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
- verify_stderr <<-\EOF
- fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
- EOF
+ test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
)
'
@@ -90,10 +78,8 @@ test_expect_success 'fetch conflict: criss-cross args' '
git fetch origin \
refs/heads/branch1:refs/remotes/origin/branch2 \
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
- verify_stderr <<-\EOF
- warning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2
- warning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1
- EOF
+ test_i18ngrep "warning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2" error &&
+ test_i18ngrep "warning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1" error
)
'