]> git.lizzy.rs Git - rust.git/commitdiff
Use an absolute path in test_process_output_fail_to_start
authorAndrew Chin <achin@eminence32.net>
Sat, 25 Jan 2014 00:15:06 +0000 (19:15 -0500)
committerAndrew Chin <achin@eminence32.net>
Sat, 25 Jan 2014 00:15:06 +0000 (19:15 -0500)
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.

src/libstd/run.rs

index f42163791a6abc36c7e1eb4586810ed21d58fb8b..d0ca6efd2472b62ade7afcdd9dfc57a41c615777 100644 (file)
@@ -360,7 +360,7 @@ fn test_process_output_fail_to_start() {
             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());