1
Fork 0

Fixes test which are now run due to should_panic

Since I changed no_run to should_panic on some tests, the were run but
two lacked an actual assertion. Further, I missed to check the return
type on another test.
This commit is contained in:
Lukas Pustina 2016-03-22 15:19:24 +01:00
parent 0dd5f67f4a
commit 561337223f

View file

@ -314,6 +314,8 @@ impl Command {
/// println!("status: {}", output.status);
/// println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
/// println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
///
/// assert!(output.status.success());
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub fn output(&mut self) -> io::Result<Output> {
@ -335,6 +337,8 @@ impl Command {
/// .expect("failed to execute process");
///
/// println!("process exited with: {}", status);
///
/// assert!(status.success());
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub fn status(&mut self) -> io::Result<ExitStatus> {
@ -518,7 +522,7 @@ impl Child {
/// let ecode = child.wait_with_output()
/// .expect("failed to wait on child");
///
/// assert!(ecode.success());
/// assert!(ecode.status.success());
/// ```
///
#[stable(feature = "process", since = "1.0.0")]