Browse Source

i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 14 years ago
parent
commit
f2c8c8007c
  1. 10
      t/t2020-checkout-detach.sh
  2. 16
      t/t2204-add-ignored.sh
  3. 8
      t/t3030-merge-recursive.sh
  4. 6
      t/t3200-branch.sh

10
t/t2020-checkout-detach.sh

@ -13,10 +13,10 @@ check_not_detached () { @@ -13,10 +13,10 @@ check_not_detached () {

ORPHAN_WARNING='you are leaving .* commit.*behind'
check_orphan_warning() {
grep "$ORPHAN_WARNING" "$1"
test_i18ngrep "$ORPHAN_WARNING" "$1"
}
check_no_orphan_warning() {
! grep "$ORPHAN_WARNING" "$1"
test_i18ngrep ! "$ORPHAN_WARNING" "$1"
}

reset () {
@ -111,7 +111,7 @@ test_expect_success 'checkout warns on orphan commits' ' @@ -111,7 +111,7 @@ test_expect_success 'checkout warns on orphan commits' '
git checkout master 2>stderr
'

test_expect_success C_LOCALE_OUTPUT 'checkout warns on orphan commits: output' '
test_expect_success 'checkout warns on orphan commits: output' '
check_orphan_warning stderr
'

@ -121,7 +121,7 @@ test_expect_success 'checkout does not warn leaving ref tip' ' @@ -121,7 +121,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '
git checkout master 2>stderr
'

test_expect_success C_LOCALE_OUTPUT 'checkout does not warn leaving ref tip' '
test_expect_success 'checkout does not warn leaving ref tip' '
check_no_orphan_warning stderr
'

@ -131,7 +131,7 @@ test_expect_success 'checkout does not warn leaving reachable commit' ' @@ -131,7 +131,7 @@ test_expect_success 'checkout does not warn leaving reachable commit' '
git checkout master 2>stderr
'

test_expect_success C_LOCALE_OUTPUT 'checkout does not warn leaving reachable commit' '
test_expect_success 'checkout does not warn leaving reachable commit' '
check_no_orphan_warning stderr
'


16
t/t2204-add-ignored.sh

@ -34,8 +34,8 @@ do @@ -34,8 +34,8 @@ do
! test -s out
'

test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i output" '
grep -e "Use -f if" err
test_expect_success "complaints for ignored $i output" '
test_i18ngrep -e "Use -f if" err
'

test_expect_success "complaints for ignored $i with unignored file" '
@ -44,8 +44,8 @@ do @@ -44,8 +44,8 @@ do
git ls-files "$i" >out &&
! test -s out
'
test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i with unignored file output" '
grep -e "Use -f if" err
test_expect_success "complaints for ignored $i with unignored file output" '
test_i18ngrep -e "Use -f if" err
'
done

@ -61,10 +61,10 @@ do @@ -61,10 +61,10 @@ do
)
'

test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i in dir output" '
test_expect_success "complaints for ignored $i in dir output" '
(
cd dir &&
grep -e "Use -f if" err
test_i18ngrep -e "Use -f if" err
)
'
done
@ -81,10 +81,10 @@ do @@ -81,10 +81,10 @@ do
)
'

test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i in sub output" '
test_expect_success "complaints for ignored $i in sub output" '
(
cd sub &&
grep -e "Use -f if" err
test_i18ngrep -e "Use -f if" err
)
'
done

8
t/t3030-merge-recursive.sh

@ -312,20 +312,20 @@ test_expect_success 'merge-recursive result' ' @@ -312,20 +312,20 @@ test_expect_success 'merge-recursive result' '

'

test_expect_success C_LOCALE_OUTPUT 'fail if the index has unresolved entries' '
test_expect_success 'fail if the index has unresolved entries' '

rm -fr [abcd] &&
git checkout -f "$c1" &&

test_must_fail git merge "$c5" &&
test_must_fail git merge "$c5" 2> out &&
grep "not possible because you have unmerged files" out &&
test_i18ngrep "not possible because you have unmerged files" out &&
git add -u &&
test_must_fail git merge "$c5" 2> out &&
grep "You have not concluded your merge" out &&
test_i18ngrep "You have not concluded your merge" out &&
rm -f .git/MERGE_HEAD &&
test_must_fail git merge "$c5" 2> out &&
grep "Your local changes to the following files would be overwritten by merge:" out
test_i18ngrep "Your local changes to the following files would be overwritten by merge:" out
'

test_expect_success 'merge-recursive remove conflict' '

6
t/t3200-branch.sh

@ -203,10 +203,12 @@ test_expect_success 'test deleting branch deletes branch config' \ @@ -203,10 +203,12 @@ test_expect_success 'test deleting branch deletes branch config' \
test -z "$(git config branch.my7.remote)" &&
test -z "$(git config branch.my7.merge)"'

test_expect_success C_LOCALE_OUTPUT 'test deleting branch without config' \
test_expect_success 'test deleting branch without config' \
'git branch my7 s &&
sha1=$(git rev-parse my7 | cut -c 1-7) &&
test "$(git branch -d my7 2>&1)" = "Deleted branch my7 (was $sha1)."'
echo "Deleted branch my7 (was $sha1)." >expect &&
git branch -d my7 >actual 2>&1 &&
test_i18ncmp expect actual'

test_expect_success 'test --track without .fetch entries' \
'git branch --track my8 &&

Loading…
Cancel
Save