Skip to content

Commit 8102961

Browse files
committed
fixup! t6006: be explicit about the encoding of test strings for msysgit
1 parent cc27c9e commit 8102961

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

t/t6006-rev-list-format.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,25 @@ 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' | iconv -t utf-8)
16-
added_iso88591=$(printf 'added (hinzugef\303\274gt) foo' | iconv -f utf-8 -t iso8859-1)
15+
added=$(printf "added (hinzugef\303\274gt) foo")
16+
added_iso88591=$(echo "$added" | iconv -f utf-8 -t iso8859-1)
1717
# same but "changed"
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)
18+
changed=$(printf "changed (ge\303\244ndert) foo")
19+
changed_iso88591=$(echo "$changed" | iconv -f utf-8 -t iso8859-1)
2020

2121
test_expect_success 'setup' '
2222
: >foo &&
2323
git add foo &&
2424
git config i18n.commitEncoding iso8859-1 &&
25-
git commit -m "$added_iso88591" &&
25+
echo "$added_iso88591" > commit-msg &&
26+
git commit -F commit-msg &&
2627
head1=$(git rev-parse --verify HEAD) &&
2728
head1_short=$(git rev-parse --verify --short $head1) &&
2829
tree1=$(git rev-parse --verify HEAD:) &&
2930
tree1_short=$(git rev-parse --verify --short $tree1) &&
3031
echo "$changed" > foo &&
31-
git commit -a -m "$changed_iso88591" &&
32+
echo "$changed_iso88591" > commit-msg &&
33+
git commit -a -F commit-msg &&
3234
head2=$(git rev-parse --verify HEAD) &&
3335
head2_short=$(git rev-parse --verify --short $head2) &&
3436
tree2=$(git rev-parse --verify HEAD:) &&
@@ -206,12 +208,12 @@ test_expect_success '%C(auto) respects --color=auto (stdout not tty)' '
206208
)
207209
'
208210

209-
printf 'Test printing of complex bodies
211+
printf "Test printing of complex bodies
210212
211213
This commit message is much longer than the others,
212214
and it will be encoded in iso8859-1. We should therefore
213-
include an iso8859 character: \xc2\xa1bueno!
214-
' | iconv -f utf-8 -t iso8859-1 > commit-msg
215+
include an iso8859 character: \302\241bueno!
216+
" | iconv -f utf-8 -t iso8859-1 > commit-msg
215217

216218
test_expect_success 'setup complex body' '
217219
git config i18n.commitencoding iso8859-1 &&

0 commit comments

Comments
 (0)