mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-26 01:31:57 -07:00
Skip regression 210 test on APFS
APFS does not support creating filenames with invalid UTF-8 byte codes, thus this test doesn't make sense. Skip it on file systems where this shouldn't be possible. Fixes #559
This commit is contained in:
committed by
Andrew Gallant
parent
a98156e71c
commit
8dc513b5d2
@@ -1015,11 +1015,14 @@ fn regression_210() {
|
||||
|
||||
let wd = WorkDir::new("regression_210");
|
||||
let mut cmd = wd.command();
|
||||
wd.create(badutf8, "test");
|
||||
cmd.arg("-H").arg("test").arg(badutf8);
|
||||
// APFS does not support creating files with invalid UTF-8 bytes.
|
||||
// https://github.com/BurntSushi/ripgrep/issues/559
|
||||
if wd.try_create(badutf8, "test").is_ok() {
|
||||
cmd.arg("-H").arg("test").arg(badutf8);
|
||||
|
||||
let out = wd.output(&mut cmd);
|
||||
assert_eq!(out.stdout, b"foo\xffbar:test\n".to_vec());
|
||||
let out = wd.output(&mut cmd);
|
||||
assert_eq!(out.stdout, b"foo\xffbar:test\n".to_vec());
|
||||
}
|
||||
}
|
||||
|
||||
// See: https://github.com/BurntSushi/ripgrep/issues/228
|
||||
|
Reference in New Issue
Block a user