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).
This commit is contained in:
parent
262b958a4b
commit
816e46dd63
3 changed files with 43 additions and 5 deletions
|
|
@ -18,6 +18,7 @@
|
|||
use std::libc;
|
||||
use std::run;
|
||||
use std::str;
|
||||
use std::rt::io;
|
||||
|
||||
#[test]
|
||||
fn test_destroy_once() {
|
||||
|
|
@ -29,7 +30,9 @@ fn test_destroy_once() {
|
|||
fn test_destroy_twice() {
|
||||
let mut p = run::Process::new("echo", [], run::ProcessOptions::new());
|
||||
p.destroy(); // this shouldnt crash...
|
||||
p.destroy(); // ...and nor should this (and nor should the destructor)
|
||||
do io::io_error::cond.trap(|_| {}).inside {
|
||||
p.destroy(); // ...and nor should this (and nor should the destructor)
|
||||
}
|
||||
}
|
||||
|
||||
fn test_destroy_actually_kills(force: bool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue