Skip to content

Commit 438ac96

Browse files
committed
t0028: fix test for UTF-16-LE-BOM
According to its name, the test is designed for UTF-16-LE-BOM. However, possibly due to copy&paste oversight, it was using UTF-32. While the test succeeds (extra \000\000 are interpreted as NUL), I myself had an unrelated problem which caused the test to fail. When analyzing the failure I was quite puzzled by the fact that the test is obviously bugged. And it seems that I'm not alone: https://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u Fix the test to follow its original intention. Signed-off-by: Alexandr Miloslavskiy <[email protected]>
1 parent 4c86140 commit 438ac96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t0028-working-tree-encoding.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test_expect_success 'setup test files' '
4040
printf "$text" | write_utf16 >test.utf16.raw &&
4141
printf "$text" | write_utf32 >test.utf32.raw &&
4242
printf "\377\376" >test.utf16lebom.raw &&
43-
printf "$text" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&
43+
printf "$text" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&
4444
4545
# Line ending tests
4646
printf "one\ntwo\nthree\n" >lf.utf8.raw &&

0 commit comments

Comments
 (0)