Skip to content

Commit

Permalink
i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014
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 fff1bb3 commit 68b2a00
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions t/t3700-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ test_expect_success 'git add --dry-run of non-existing file' "
test_must_fail git add --dry-run track-this ignored-file >actual 2>&1
"

test_expect_success C_LOCALE_OUTPUT 'git add --dry-run of an existing file output' "
test_expect_success 'git add --dry-run of an existing file output' "
echo \"fatal: pathspec 'ignored-file' did not match any files\" >expect &&
test_cmp expect actual
test_i18ncmp expect actual
"

cat >expect.err <<\EOF
Expand All @@ -290,9 +290,9 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file' '
test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err
'

test_expect_success C_LOCALE_OUTPUT 'git add --dry-run --ignore-missing of non-existing file output' '
test_cmp expect.out actual.out &&
test_cmp expect.err actual.err
test_expect_success 'git add --dry-run --ignore-missing of non-existing file output' '
test_i18ncmp expect.out actual.out &&
test_i18ncmp expect.err actual.err
'

test_done
8 changes: 4 additions & 4 deletions t/t4001-diff-rename.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ test_expect_success \
'validate the output.' \
'compare_diff_patch current expected'

test_expect_success C_LOCALE_OUTPUT 'favour same basenames over different ones' '
test_expect_success 'favour same basenames over different ones' '
cp path1 another-path &&
git add another-path &&
git commit -m 1 &&
git rm path1 &&
mkdir subdir &&
git mv another-path subdir/path1 &&
git status | grep "renamed: .*path1 -> subdir/path1"'
git status | test_i18ngrep "renamed: .*path1 -> subdir/path1"'

test_expect_success C_LOCALE_OUTPUT 'favour same basenames even with minor differences' '
test_expect_success 'favour same basenames even with minor differences' '
git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
git status | grep "renamed: .*path1 -> subdir/path1"'
git status | test_i18ngrep "renamed: .*path1 -> subdir/path1"'

test_done
8 changes: 4 additions & 4 deletions t/t4014-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -614,13 +614,13 @@ echo "fatal: --name-only does not make sense" > expect.name-only
echo "fatal: --name-status does not make sense" > expect.name-status
echo "fatal: --check does not make sense" > expect.check

test_expect_success C_LOCALE_OUTPUT 'options no longer allowed for format-patch' '
test_expect_success 'options no longer allowed for format-patch' '
test_must_fail git format-patch --name-only 2> output &&
test_cmp expect.name-only output &&
test_i18ncmp expect.name-only output &&
test_must_fail git format-patch --name-status 2> output &&
test_cmp expect.name-status output &&
test_i18ncmp expect.name-status output &&
test_must_fail git format-patch --check 2> output &&
test_cmp expect.check output'
test_i18ncmp expect.check output'

test_expect_success 'format-patch --numstat should produce a patch' '
git format-patch --numstat --stdout master..side > output &&
Expand Down

0 comments on commit 68b2a00

Please sign in to comment.