This test is designed to ensure that running a non-existent executable
results in a correct error message (FileNotFound in this case of this
test). However, if you try to run an executable that doesn't exist, and
that requires searching through the $PATH, and one of the $PATH components
is not readable, then a PermissionDenied error will be returned, instead
of FileNotFound.
trapped_io_error = true;
assert_eq!(e.kind, FileNotFound);
}).inside(|| -> Option<run::ProcessOutput> {
- run::process_output("no-binary-by-this-name-should-exist", [])
+ run::process_output("/no-binary-by-this-name-should-exist", [])
});
assert!(trapped_io_error);
assert!(opt_outp.is_none());