summaryrefslogtreecommitdiff
path: root/t/t3900-i18n-commit.sh
diff options
context:
space:
mode:
authorPat Notz <patnotz@gmail.com>2010-11-02 13:59:10 -0600
committerJunio C Hamano <gitster@pobox.com>2010-11-04 13:53:35 -0700
commitb1a6c0a96f70fe39958b3315a99667740497d703 (patch)
tree75aef4db517848b49119467e2ced6527934c2711 /t/t3900-i18n-commit.sh
parentd71b8ba7c959e414d36974af890e3e2cbd2acbb9 (diff)
downloadgit-b1a6c0a96f70fe39958b3315a99667740497d703.tar.gz
add tests of commit --fixup
t7500: test expected behavior of commit --fixup t3415: test interaction of commit --fixup with rebase --autosquash t3900: test commit --fixup with i18n encodings Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3900-i18n-commit.sh')
-rwxr-xr-xt/t3900-i18n-commit.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index 256c4c9701..f4775ee285 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -133,4 +133,31 @@ do
'
done
+test_commit_autosquash_flags () {
+ H=$1
+ flag=$2
+ test_expect_success "commit --$flag with $H encoding" '
+ git config i18n.commitencoding $H &&
+ git checkout -b $H-$flag C0 &&
+ echo $H >>F &&
+ git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
+ test_tick &&
+ echo intermediate stuff >>G &&
+ git add G &&
+ git commit -a -m "intermediate commit" &&
+ test_tick &&
+ echo $H $flag >>F &&
+ git commit -a --$flag HEAD~1 $3 &&
+ 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_commit_autosquash_flags eucJP fixup
+
test_done