More thorough tests for UTF16LE

This commit is contained in:
Keith Hall committed 2025-08-16 15:35:57 +03:00
1 parent 6675153460
commit 40c4c8e542
4 files changed
+39 -3

No files matched your search

+20
View File
@@ -1321,6 +1321,26 @@ fn utf16() {
.assert()
.success()
.stdout("hello world\n");
bat()
.arg("--plain")
.arg("--decorations=always")
.arg("test_UTF-16BE.txt")
.assert()
.success()
.stdout("hello world\nthis is a test\n");
}
#[test]
fn utf16le() {
bat()
.arg("--decorations=always")
.arg("--style=numbers")
.arg("--color=never")
.arg("test_UTF-16LE-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