[PATCH v9 4/5] t6006: add two more tests for the case i18n.commitEncoding is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In de6029a2d7734a93a9e27b9c4471862a47dd8123 'complex-subject' test was
changed. Revert it back, and add two more tests to test encoding
conversions with no i18n.commitEncoding set.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@xxxxxxxxx>
Reviewed-by: Johannes Sixt <j.sixt@xxxxxxxxxxxxx>
---
 t/t6006-rev-list-format.sh | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index e069263..843134f 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -217,12 +217,7 @@ test_expect_success 'setup complex body' '
 	git config i18n.commitencoding iso8859-1 &&
 	echo change2 >foo && git commit -a -F commit-msg &&
 	head3=$(git rev-parse --verify HEAD) &&
-	head3_short=$(git rev-parse --short $head3) &&
-	# unset commit encoding config
-	# otherwise %e does not print encoding value
-	# and following test fails
-	git config --unset i18n.commitEncoding
-
+	head3_short=$(git rev-parse --short $head3)
 '
 
 test_format complex-encoding %e <<EOF
@@ -238,12 +233,35 @@ test_format complex-subject %s <<EOF
 commit $head3
 Test printing of complex bodies
 commit $head2
+$changed_iso88591
+commit $head1
+$added_iso88591
+EOF
+
+test_format complex-body %b <<EOF
+commit $head3
+This commit message is much longer than the others,
+and it will be encoded in iso8859-1. We should therefore
+include an iso8859 character: ¡bueno!
+
+commit $head2
+commit $head1
+EOF
+
+# Git uses i18n.commitEncoding if no i18n.logOutputEncoding set
+# so unset i18n.commitEncoding to test encoding conversion
+git config --unset i18n.commitEncoding
+
+test_format complex-subject-commitencoding-unset %s <<EOF
+commit $head3
+Test printing of complex bodies
+commit $head2
 $changed
 commit $head1
 $added
 EOF
 
-test_format complex-body %b <<EOF
+test_format complex-body-commitencoding-unset %b <<EOF
 commit $head3
 This commit message is much longer than the others,
 and it will be encoded in iso8859-1. We should therefore
-- 
1.8.3.1.15.g5c23c1e

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]