do_for_each_reflog(): use a strbuf to hold logfile name
[gitweb.git] / t / t3900-i18n-commit.sh
index c06a5ee7660c3fd7ca15860cfb761b2c4d953e08..37ddabba2d60956a4d8da63585bec5a622e12a5d 100755 (executable)
@@ -34,6 +34,12 @@ test_expect_success 'no encoding header for base case' '
        test z = "z$E"
 '
 
+test_expect_failure 'UTF-16 refused because of NULs' '
+       echo UTF-16 >F &&
+       git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt
+'
+
+
 for H in ISO8859-1 eucJP ISO-2022-JP
 do
        test_expect_success "$H setup" '
@@ -147,19 +153,19 @@ test_commit_autosquash_flags () {
                git commit -a -m "intermediate commit" &&
                test_tick &&
                echo $H $flag >>F &&
-               git commit -a --$flag HEAD~1 $3 &&
+               git commit -a --$flag HEAD~1 &&
                E=$(git cat-file commit '$H-$flag' |
                        sed -ne "s/^encoding //p") &&
                test "z$E" = "z$H" &&
                git config --unset-all i18n.commitencoding &&
                git rebase --autosquash -i HEAD^^^ &&
                git log --oneline >actual &&
-               test 3 = $(wc -l <actual)
+               test_line_count = 3 actual
        '
 }
 
 test_commit_autosquash_flags eucJP fixup
 
-test_commit_autosquash_flags ISO-2022-JP squash '-m "squash message"'
+test_commit_autosquash_flags ISO-2022-JP squash
 
 test_done