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

More thorough tests for UTF16LE

This commit is contained in:
Keith Hall
2025-08-16 15:33:30 +03:00
parent 6675153460
commit 40c4c8e542
4 changed files with 39 additions and 3 deletions

BIN
tests/examples/test_UTF-16BE.txt vendored Normal file

Binary file not shown.

Binary file not shown.

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