1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 03:12:25 +01:00

Apply same fix and tests for UTF16BE

This commit is contained in:
Keith Hall
2025-08-16 15:33:53 +03:00
parent 40c4c8e542
commit 96ce80d0e2
4 changed files with 25 additions and 9 deletions

Binary file not shown.

View File

@@ -1343,6 +1343,18 @@ fn utf16le() {
.stdout(" 1 上一伊刀\n 2 foo bar\n 3 hello world\n");
}
#[test]
fn utf16be() {
bat()
.arg("--decorations=always")
.arg("--style=numbers")
.arg("--color=never")
.arg("test_UTF-16BE-complicated.txt")
.assert()
.success()
.stdout(" 1 上一伊刀\n 2 foo bar\n 3 hello world\n");
}
// Regression test for https://github.com/sharkdp/bat/issues/1922
#[test]
fn bom_not_stripped_in_loop_through_mode() {