mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 01:30:21 -07:00
Don't create command until we know we can test it
For regression 210 we may not actually need to test anything if the file system doesn't support creating files with invalid UTF-8 bytes. Don't create the command until we know there will be an assertion.
This commit is contained in:
parent
0d2354aca6
commit
712311fdc6
@ -1014,10 +1014,10 @@ fn regression_210() {
|
||||
let badutf8 = OsStr::from_bytes(&b"foo\xffbar"[..]);
|
||||
|
||||
let wd = WorkDir::new("regression_210");
|
||||
let mut cmd = wd.command();
|
||||
// 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() {
|
||||
let mut cmd = wd.command();
|
||||
cmd.arg("-H").arg("test").arg(badutf8);
|
||||
|
||||
let out = wd.output(&mut cmd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user