Skip to content

Commit 5613372

Browse files
committed
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.
1 parent 0dd5f67 commit 5613372

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libstd/process.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ impl Command {
314314
/// println!("status: {}", output.status);
315315
/// println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
316316
/// println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
317+
///
318+
/// assert!(output.status.success());
317319
/// ```
318320
#[stable(feature = "process", since = "1.0.0")]
319321
pub fn output(&mut self) -> io::Result<Output> {
@@ -335,6 +337,8 @@ impl Command {
335337
/// .expect("failed to execute process");
336338
///
337339
/// println!("process exited with: {}", status);
340+
///
341+
/// assert!(status.success());
338342
/// ```
339343
#[stable(feature = "process", since = "1.0.0")]
340344
pub fn status(&mut self) -> io::Result<ExitStatus> {
@@ -518,7 +522,7 @@ impl Child {
518522
/// let ecode = child.wait_with_output()
519523
/// .expect("failed to wait on child");
520524
///
521-
/// assert!(ecode.success());
525+
/// assert!(ecode.status.success());
522526
/// ```
523527
///
524528
#[stable(feature = "process", since = "1.0.0")]

0 commit comments

Comments
 (0)