mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-13 00:06:03 -06:00
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
This commit is contained in:
commit
d92a015660
@ -46,9 +46,8 @@ do
|
|||||||
|
|
||||||
test_expect_success "am$with3 --skip continue after failed am$with3" '
|
test_expect_success "am$with3 --skip continue after failed am$with3" '
|
||||||
test_must_fail git am$with3 --skip >output &&
|
test_must_fail git am$with3 --skip >output &&
|
||||||
test_i18ngrep "^Applying" output >output.applying &&
|
test_i18ngrep "^Applying: 6$" output &&
|
||||||
test_i18ngrep "^Applying: 6$" output.applying &&
|
test_cmp file-2-expect file-2 &&
|
||||||
test_i18ncmp file-2-expect file-2 &&
|
|
||||||
test ! -f .git/MERGE_RR
|
test ! -f .git/MERGE_RR
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|||||||
@ -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' '
|
test_expect_success 'setup' '
|
||||||
git commit --allow-empty -m "Initial" &&
|
git commit --allow-empty -m "Initial" &&
|
||||||
git branch branch1 &&
|
git branch branch1 &&
|
||||||
@ -48,9 +40,7 @@ test_expect_success 'fetch conflict: config vs. config' '
|
|||||||
"+refs/heads/branch2:refs/remotes/origin/branch1" && (
|
"+refs/heads/branch2:refs/remotes/origin/branch1" && (
|
||||||
cd ccc &&
|
cd ccc &&
|
||||||
test_must_fail git fetch origin 2>error &&
|
test_must_fail git fetch origin 2>error &&
|
||||||
verify_stderr <<-\EOF
|
test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
|
||||||
fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
|
|
||||||
EOF
|
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -77,9 +67,7 @@ test_expect_success 'fetch conflict: arg vs. arg' '
|
|||||||
test_must_fail git fetch origin \
|
test_must_fail git fetch origin \
|
||||||
refs/heads/*:refs/remotes/origin/* \
|
refs/heads/*:refs/remotes/origin/* \
|
||||||
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
|
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
|
||||||
verify_stderr <<-\EOF
|
test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
|
||||||
fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
|
|
||||||
EOF
|
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -90,10 +78,8 @@ test_expect_success 'fetch conflict: criss-cross args' '
|
|||||||
git fetch origin \
|
git fetch origin \
|
||||||
refs/heads/branch1:refs/remotes/origin/branch2 \
|
refs/heads/branch1:refs/remotes/origin/branch2 \
|
||||||
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
|
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
|
||||||
verify_stderr <<-\EOF
|
test_i18ngrep "warning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2" error &&
|
||||||
warning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2
|
test_i18ngrep "warning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1" error
|
||||||
warning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1
|
|
||||||
EOF
|
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user