Skip to content

Commit

Permalink
i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t700…
Browse files Browse the repository at this point in the history
…4, t7012 and t7060

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Apr 13, 2011
1 parent 68b2a00 commit b3e1900
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions t/t5541-http-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output
'

test_expect_success C_LOCALE_OUTPUT 'push fails for non-fast-forward refs unmatched by remote helper: our output' '
grep "To prevent you from losing history, non-fast-forward updates were rejected" \
test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: our output' '
test_i18ngrep "To prevent you from losing history, non-fast-forward updates were rejected" \
output
'

Expand Down
4 changes: 2 additions & 2 deletions t/t6040-tracking-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ b3 behind 1
b4 ahead 2
EOF

test_expect_success C_LOCALE_OUTPUT 'branch -v' '
test_expect_success 'branch -v' '
(
cd test &&
git branch -v
) |
sed -n -e "$script" >actual &&
test_cmp expect actual
test_i18ncmp expect actual
'

test_expect_success 'checkout' '
Expand Down
4 changes: 2 additions & 2 deletions t/t6120-describe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ cat - >err.expect <<EOF
warning: tag 'A' is really 'Q' here
EOF
check_describe A-* HEAD
test_expect_success C_LOCALE_OUTPUT 'warning was displayed for Q' '
test_cmp err.expect err.actual
test_expect_success 'warning was displayed for Q' '
test_i18ncmp err.expect err.actual
'
test_expect_success 'rename tag Q back to A' '
mv .git/refs/tags/Q .git/refs/tags/A
Expand Down
6 changes: 2 additions & 4 deletions t/t7004-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1120,13 +1120,11 @@ test_expect_success \
! (GIT_EDITOR=cat git tag -a initial-comment > actual)
'

test_expect_success \
C_LOCALE_OUTPUT \
'message in editor has initial comment: first line' '
test_expect_success 'message in editor has initial comment: first line' '
# check the first line --- should be empty
echo >first.expect &&
sed -e 1q <actual >first.actual &&
test_cmp first.expect first.actual
test_i18ncmp first.expect first.actual
'

test_expect_success \
Expand Down
8 changes: 4 additions & 4 deletions t/t7012-skip-worktree-writing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@ cat >expected <<EOF
Would remove expected
Would remove result
EOF
test_expect_success C_LOCALE_OUTPUT 'git-clean, absent case' '
test_expect_success 'git-clean, absent case' '
setup_absent &&
git clean -n > result &&
test_cmp expected result
test_i18ncmp expected result
'

test_expect_success C_LOCALE_OUTPUT 'git-clean, dirty case' '
test_expect_success 'git-clean, dirty case' '
setup_dirty &&
git clean -n > result &&
test_cmp expected result
test_i18ncmp expected result
'

#TODO test_expect_failure 'git-apply adds file' false
Expand Down
6 changes: 3 additions & 3 deletions t/t7060-wtstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cat >expect <<EOF
no changes added to commit (use "git add" and/or "git commit -a")
EOF

test_expect_success C_LOCALE_OUTPUT 'M/D conflict does not segfault' '
test_expect_success 'M/D conflict does not segfault' '
mkdir mdconflict &&
(
cd mdconflict &&
Expand All @@ -50,9 +50,9 @@ test_expect_success C_LOCALE_OUTPUT 'M/D conflict does not segfault' '
git commit -m delete &&
test_must_fail git merge master &&
test_must_fail git commit --dry-run >../actual &&
test_cmp ../expect ../actual &&
test_i18ncmp ../expect ../actual &&
git status >../actual &&
test_cmp ../expect ../actual
test_i18ncmp ../expect ../actual
)
'

Expand Down

0 comments on commit b3e1900

Please sign in to comment.