Skip to content

Commit e123638

Browse files
committed
t6006: be explicit about the encoding of test strings for msysgit
Signed-off-by: Pat Thoyts <[email protected]>
1 parent 4d26a96 commit e123638

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

t/t6006-rev-list-format.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ test_tick
1212
# String "added" in German
1313
# (translated with Google Translate),
1414
# encoded in UTF-8, used as a commit log message below.
15-
added=$(printf "added (hinzugef\303\274gt) foo")
16-
added_iso88591=$(echo "$added" | iconv -f utf-8 -t iso8859-1)
15+
added=$(printf 'added (hinzugef\303\274gt) foo' | iconv -t utf-8)
16+
added_iso88591=$(printf 'added (hinzugef\303\274gt) foo' | iconv -f utf-8 -t iso8859-1)
1717
# same but "changed"
18-
changed=$(printf "changed (ge\303\244ndert) foo")
19-
changed_iso88591=$(echo "$changed" | iconv -f utf-8 -t iso8859-1)
18+
changed=$(printf "changed (ge\303\244ndert) foo" | iconv -t utf-8)
19+
changed_iso88591=$(printf 'changed (ge\303\244ndert) foo' | iconv -f utf-8 -t iso8859-1)
2020

2121
test_expect_success 'setup' '
2222
: >foo &&
@@ -206,13 +206,12 @@ test_expect_success '%C(auto) respects --color=auto (stdout not tty)' '
206206
)
207207
'
208208

209-
iconv -f utf-8 -t iso8859-1 > commit-msg <<EOF
210-
Test printing of complex bodies
209+
printf 'Test printing of complex bodies
211210
212211
This commit message is much longer than the others,
213212
and it will be encoded in iso8859-1. We should therefore
214-
include an iso8859 character: ¡bueno!
215-
EOF
213+
include an iso8859 character: \xc2\xa1bueno!
214+
' | iconv -f utf-8 -t iso8859-1 > commit-msg
216215

217216
test_expect_success 'setup complex body' '
218217
git config i18n.commitencoding iso8859-1 &&

0 commit comments

Comments
 (0)