X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3900-i18n-commit.sh;h=94b1c24b0a3629a6b06466186006a526bb9b4d9d;hb=948dd346fd6748f8c2c0ae488759cbbd05a09320;hp=ffddb68db3abbf1ab14bf99f3c9514a7ee0c276b;hpb=82ff9d2c8b0d449fbaae21a69bcc3b98a4012180;p=git.git diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh index ffddb68db..94b1c24b0 100755 --- a/t/t3900-i18n-commit.sh +++ b/t/t3900-i18n-commit.sh @@ -8,28 +8,28 @@ test_description='commit and log output encodings' . ./test-lib.sh compare_with () { - git-show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current && + git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' >current && git diff current "$2" } test_expect_success setup ' : >F && - git-add F && - T=$(git-write-tree) && - C=$(git-commit-tree $T <../t3900/1-UTF-8.txt) && - git-update-ref HEAD $C && + git add F && + T=$(git write-tree) && + C=$(git commit-tree $T <../t3900/1-UTF-8.txt) && + git update-ref HEAD $C && git-tag C0 ' test_expect_success 'no encoding header for base case' ' - E=$(git-cat-file commit C0 | sed -ne "s/^encoding //p") && + E=$(git cat-file commit C0 | sed -ne "s/^encoding //p") && test z = "z$E" ' for H in ISO-8859-1 EUCJP ISO-2022-JP do test_expect_success "$H setup" ' - git-config i18n.commitencoding $H && + git config i18n.commitencoding $H && git-checkout -b $H C0 && echo $H >F && git-commit -a -F ../t3900/$H.txt @@ -39,21 +39,21 @@ done for H in ISO-8859-1 EUCJP ISO-2022-JP do test_expect_success "check encoding header for $H" ' - E=$(git-cat-file commit '$H' | sed -ne "s/^encoding //p") && + E=$(git cat-file commit '$H' | sed -ne "s/^encoding //p") && test "z$E" = "z'$H'" ' done test_expect_success 'config to remove customization' ' - git-config --unset-all i18n.commitencoding && - if Z=$(git-config --get-all i18n.commitencoding) + git config --unset-all i18n.commitencoding && + if Z=$(git config --get-all i18n.commitencoding) then echo Oops, should have failed. false else test z = "z$Z" fi && - git-config i18n.commitencoding utf-8 + git config i18n.commitencoding utf-8 ' test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' ' @@ -68,8 +68,8 @@ do done test_expect_success 'config to add customization' ' - git-config --unset-all i18n.commitencoding && - if Z=$(git-config --get-all i18n.commitencoding) + git config --unset-all i18n.commitencoding && + if Z=$(git config --get-all i18n.commitencoding) then echo Oops, should have failed. false @@ -81,13 +81,13 @@ test_expect_success 'config to add customization' ' for H in ISO-8859-1 EUCJP ISO-2022-JP do test_expect_success "$H should be shown in itself now" ' - git-config i18n.commitencoding '$H' && + git config i18n.commitencoding '$H' && compare_with '$H' ../t3900/'$H'.txt ' done test_expect_success 'config to tweak customization' ' - git-config i18n.logoutputencoding utf-8 + git config i18n.logoutputencoding utf-8 ' test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' ' @@ -103,7 +103,7 @@ done for J in EUCJP ISO-2022-JP do - git-config i18n.logoutputencoding $J + git config i18n.logoutputencoding $J for H in EUCJP ISO-2022-JP do test_expect_success "$H should be shown in $J now" '