Browse Source

i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 14 years ago
parent
commit
b3e1900a74
  1. 4
      t/t5541-http-push.sh
  2. 4
      t/t6040-tracking-info.sh
  3. 4
      t/t6120-describe.sh
  4. 6
      t/t7004-tag.sh
  5. 8
      t/t7012-skip-worktree-writing.sh
  6. 6
      t/t7060-wtstatus.sh

4
t/t5541-http-push.sh

@ -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 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' ' test_expect_success '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_i18ngrep "To prevent you from losing history, non-fast-forward updates were rejected" \
output output
' '



4
t/t6040-tracking-info.sh

@ -42,13 +42,13 @@ b3 behind 1
b4 ahead 2 b4 ahead 2
EOF EOF


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


test_expect_success 'checkout' ' test_expect_success 'checkout' '

4
t/t6120-describe.sh

@ -123,8 +123,8 @@ cat - >err.expect <<EOF
warning: tag 'A' is really 'Q' here warning: tag 'A' is really 'Q' here
EOF EOF
check_describe A-* HEAD check_describe A-* HEAD
test_expect_success C_LOCALE_OUTPUT 'warning was displayed for Q' ' test_expect_success 'warning was displayed for Q' '
test_cmp err.expect err.actual test_i18ncmp err.expect err.actual
' '
test_expect_success 'rename tag Q back to A' ' test_expect_success 'rename tag Q back to A' '
mv .git/refs/tags/Q .git/refs/tags/A mv .git/refs/tags/Q .git/refs/tags/A

6
t/t7004-tag.sh

@ -1120,13 +1120,11 @@ test_expect_success \
! (GIT_EDITOR=cat git tag -a initial-comment > actual) ! (GIT_EDITOR=cat git tag -a initial-comment > actual)
' '


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


test_expect_success \ test_expect_success \

8
t/t7012-skip-worktree-writing.sh

@ -124,16 +124,16 @@ cat >expected <<EOF
Would remove expected Would remove expected
Would remove result Would remove result
EOF EOF
test_expect_success C_LOCALE_OUTPUT 'git-clean, absent case' ' test_expect_success 'git-clean, absent case' '
setup_absent && setup_absent &&
git clean -n > result && 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 && setup_dirty &&
git clean -n > result && git clean -n > result &&
test_cmp expected result test_i18ncmp expected result
' '


#TODO test_expect_failure 'git-apply adds file' false #TODO test_expect_failure 'git-apply adds file' false

6
t/t7060-wtstatus.sh

@ -38,7 +38,7 @@ cat >expect <<EOF
no changes added to commit (use "git add" and/or "git commit -a") no changes added to commit (use "git add" and/or "git commit -a")
EOF EOF


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



Loading…
Cancel
Save