Skip to content

Commit

Permalink
i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Apr 13, 2011
1 parent d3bd042 commit f2c8c80
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
10 changes: 5 additions & 5 deletions t/t2020-checkout-detach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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
'

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

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

Expand Down
16 changes: 8 additions & 8 deletions t/t2204-add-ignored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" '
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions t/t3030-merge-recursive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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' '
Expand Down
6 changes: 4 additions & 2 deletions t/t3200-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit f2c8c80

Please sign in to comment.