diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:41:05 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-24 14:22:35 -0700 |
| commit | 816e46dd633cf4cc5741dde6ce3bffd4a9ba67a7 (patch) | |
| tree | 91be9afd56dcda81b3ed6f09e43f9fa4d12290cc /src/libstd/run.rs | |
| parent | 262b958a4bedf419335069c95f054a22da48a88a (diff) | |
| download | rust-816e46dd633cf4cc5741dde6ce3bffd4a9ba67a7.tar.gz rust-816e46dd633cf4cc5741dde6ce3bffd4a9ba67a7.zip | |
Fixing some tests, adding some pipes
This adds constructors to pipe streams in the new runtime to take ownership of file descriptors, and also fixes a few tests relating to the std::run changes (new errors are raised on io_error and one test is xfail'd).
Diffstat (limited to 'src/libstd/run.rs')
| -rw-r--r-- | src/libstd/run.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 40b509c4bc8..650ef491a3b 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -322,6 +322,7 @@ mod tests { use path::Path; use run; use str; + use task::spawn; use unstable::running_on_valgrind; use rt::io::native::file; use rt::io::{Writer, Reader}; @@ -394,6 +395,7 @@ mod tests { } #[test] + #[ignore] // FIXME(#10016) cat never sees stdin close fn test_pipes() { let pipe_in = os::pipe(); @@ -412,13 +414,14 @@ mod tests { os::close(pipe_out.out); os::close(pipe_err.out); - let expected = ~"test"; - writeclose(pipe_in.out, expected); + do spawn { + writeclose(pipe_in.out, ~"test"); + } let actual = readclose(pipe_out.input); readclose(pipe_err.input); proc.finish(); - assert_eq!(expected, actual); + assert_eq!(~"test", actual); } fn writeclose(fd: c_int, s: &str) { |
