Skip to content

Commit

Permalink
add --nocapture tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stupendoussuperpowers committed Aug 9, 2023
1 parent ebe124e commit de57e60
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/testsuite/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4792,6 +4792,20 @@ error: test failed, to rerun pass `--test t1`
[RUNNING] tests/t2.rs (target/debug/deps/t2[..])
error: test failed, to rerun pass `--test t2`
Caused by:
process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4)
",
)
.with_status(4)
.run();

p.cargo("test --test t2 -- --nocapture")
.with_stderr(
"\
[FINISHED] test [..]
[RUNNING] tests/t2.rs (target/debug/deps/t2[..])
error: test failed, to rerun pass `--test t2`
Caused by:
process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4)
",
Expand All @@ -4809,6 +4823,27 @@ error: test failed, to rerun pass `--test t1`
[RUNNING] tests/t2.rs (target/debug/deps/t2[..])
error: test failed, to rerun pass `--test t2`
Caused by:
process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4)
error: 2 targets failed:
`--test t1`
`--test t2`
",
)
.with_status(101)
.run();

p.cargo("test --no-fail-fast -- --nocapture")
.with_stderr(
"\
[FINISHED] test [..]
[RUNNING] tests/t1.rs (target/debug/deps/t1[..])
thread 't' panicked at 'this is a normal error', tests/t1[..]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test t1`
[RUNNING] tests/t2.rs (target/debug/deps/t2[..])
error: test failed, to rerun pass `--test t2`
Caused by:
process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4)
error: 2 targets failed:
Expand Down

0 comments on commit de57e60

Please sign in to comment.