@matheusbsbs / matheus-bagliano / commits / 03bcaacaad
Fork 0

t/t6006: add tests for a slightly more complex commit messages

Especially this tests i18n messages and encoding header. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jeff King committed Mar 28, 2007 at 17:08 UTC 03bcaacaadbb325f412e6dffec27fea6acb9321e
1 file changed +42
t/t6006-rev-list-format.sh
+42
@@ -105,4 +105,46 @@ commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
105 foobarbazxyzzy
106 EOF
107
108 +cat >commit-msg <<'EOF'
109 +Test printing of complex bodies
110 +
111 +This commit message is much longer than the others,
112 +and it will be encoded in iso8859-1. We should therefore
113 +include an iso8859 character: ¡bueno!
114 +EOF
115 +test_expect_success 'setup complex body' '
116 +git-config i18n.commitencoding iso8859-1 &&
117 + echo change2 >foo && git-commit -a -F commit-msg
118 +'
119 +
120 +test_format complex-encoding %e <<'EOF'
121 +commit f58db70b055c5718631e5c61528b28b12090cdea
122 +iso8859-1
123 +commit 131a310eb913d107dd3c09a65d1651175898735d
124 +<unknown>
125 +commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
126 +<unknown>
127 +EOF
128 +
129 +test_format complex-subject %s <<'EOF'
130 +commit f58db70b055c5718631e5c61528b28b12090cdea
131 +Test printing of complex bodies
132 +commit 131a310eb913d107dd3c09a65d1651175898735d
133 +changed foo
134 +commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
135 +added foo
136 +EOF
137 +
138 +test_format complex-body %b <<'EOF'
139 +commit f58db70b055c5718631e5c61528b28b12090cdea
140 +This commit message is much longer than the others,
141 +and it will be encoded in iso8859-1. We should therefore
142 +include an iso8859 character: ¡bueno!
143 +
144 +commit 131a310eb913d107dd3c09a65d1651175898735d
145 +<unknown>
146 +commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
147 +<unknown>
148 +EOF
149 +
150 test_done