Add test for UTF-16LE encoding

This commit is contained in:
sharkdp authored and David Peter committed 2019-02-10 10:18:07 +01:00
1 parent 906774e6d3
commit fa3244f7c1
2 files changed
+12

No files matched your search

Binary file not shown.
+12
View File
@@ -436,3 +436,15 @@ fn config_read_arguments_from_file() {
.success()
.stdout("dummy-pager-from-config\n");
}
#[test]
fn utf16() {
// The output will be converted to UTF-8 with a leading UTF-8 BOM
bat()
.arg("--plain")
.arg("--decorations=always")
.arg("test_UTF-16LE.txt")
.assert()
.success()
.stdout(std::str::from_utf8(b"\xEF\xBB\xBFhello world\n").unwrap());
}