Skip to content

Commit

Permalink
i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Apr 13, 2011
1 parent b3e1900 commit 476cca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions t/t7102-reset.sh
Expand Up @@ -423,10 +423,10 @@ Unstaged changes after reset:
M file2 M file2
EOF EOF


test_expect_success C_LOCALE_OUTPUT '--mixed refreshes the index' ' test_expect_success '--mixed refreshes the index' '
echo 123 >> file2 && echo 123 >> file2 &&
git reset --mixed HEAD > output && git reset --mixed HEAD > output &&
test_cmp expect output test_i18ncmp expect output
' '


test_expect_success 'disambiguation (1)' ' test_expect_success 'disambiguation (1)' '
Expand Down
12 changes: 6 additions & 6 deletions t/t7110-reset-merge.sh
Expand Up @@ -233,11 +233,11 @@ test_expect_success '"reset --merge HEAD^" is ok with pending merge' '
# working index HEAD target working index HEAD # working index HEAD target working index HEAD
# ---------------------------------------------------- # ----------------------------------------------------
# file1: X U B C --keep (disallowed) # file1: X U B C --keep (disallowed)
test_expect_success C_LOCALE_OUTPUT '"reset --keep HEAD^" fails with pending merge' ' test_expect_success '"reset --keep HEAD^" fails with pending merge' '
git reset --hard third && git reset --hard third &&
test_must_fail git merge branch1 && test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD^ 2>err.log && test_must_fail git reset --keep HEAD^ 2>err.log &&
grep "middle of a merge" err.log test_i18ngrep "middle of a merge" err.log
' '


# The next test will test the following: # The next test will test the following:
Expand All @@ -259,11 +259,11 @@ test_expect_success '"reset --merge HEAD" is ok with pending merge' '
# working index HEAD target working index HEAD # working index HEAD target working index HEAD
# ---------------------------------------------------- # ----------------------------------------------------
# file1: X U B B --keep (disallowed) # file1: X U B B --keep (disallowed)
test_expect_success C_LOCALE_OUTPUT '"reset --keep HEAD" fails with pending merge' ' test_expect_success '"reset --keep HEAD" fails with pending merge' '
git reset --hard third && git reset --hard third &&
test_must_fail git merge branch1 && test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD 2>err.log && test_must_fail git reset --keep HEAD 2>err.log &&
grep "middle of a merge" err.log test_i18ngrep "middle of a merge" err.log
' '


test_expect_success '--merge is ok with added/deleted merge' ' test_expect_success '--merge is ok with added/deleted merge' '
Expand All @@ -280,7 +280,7 @@ test_expect_success '--merge is ok with added/deleted merge' '
git diff --exit-code --cached git diff --exit-code --cached
' '


test_expect_success C_LOCALE_OUTPUT '--keep fails with added/deleted merge' ' test_expect_success '--keep fails with added/deleted merge' '
git reset --hard third && git reset --hard third &&
rm -f file2 && rm -f file2 &&
test_must_fail git merge branch3 && test_must_fail git merge branch3 &&
Expand All @@ -289,7 +289,7 @@ test_expect_success C_LOCALE_OUTPUT '--keep fails with added/deleted merge' '
git diff --exit-code file3 && git diff --exit-code file3 &&
git diff --exit-code branch3 file3 && git diff --exit-code branch3 file3 &&
test_must_fail git reset --keep HEAD 2>err.log && test_must_fail git reset --keep HEAD 2>err.log &&
grep "middle of a merge" err.log test_i18ngrep "middle of a merge" err.log
' '


test_done test_done

0 comments on commit 476cca6

Please sign in to comment.