mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-18 12:00:11 +02:00
Fix bug for file with invalid-utf8 filenames
This commit is contained in:
@@ -628,6 +628,18 @@ fn filename_multiple_err() {
|
||||
.failure();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn file_with_invalid_utf8_filename() {
|
||||
use std::ffi::OsStr;
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
|
||||
bat()
|
||||
.arg(OsStr::from_bytes(b"test-invalid-utf8-\xC3(.rs"))
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn do_not_panic_regression_tests() {
|
||||
for filename in &[
|
||||
|
Reference in New Issue
Block a user