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

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2011-04-12 16:20:32 -07:00
Родитель d3bd0425b2
Коммит f2c8c8007c
4 изменённых файлов: 21 добавлений и 19 удалений

Просмотреть файл

@ -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' '
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' '
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' '
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
'

Просмотреть файл

@ -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
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
)
'
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
)
'
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

Просмотреть файл

@ -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' '

Просмотреть файл

@ -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 &&