forked from frondeus/test-case
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support giving a reason to inconclusive/ignored cases
Since Rust 1.61.0 `cargo test` has included the reason string in the output. The new syntax is optional, so `inconclusive` is still accepted, a reason may be given inside optional brackets `inconclusive["some reason"]`. Parentheses are not used to avoid ambiguity with the output/result. A custom `impl Debug` is used to avoid injecting an unsightly `inconclusivewithreason_litstr_token` into the test name by default. Fixes: frondeus#102
- Loading branch information
Showing
3 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
tests/snapshots/rust-stable/acceptance__cases_can_be_ignored.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
--- | ||
source: tests/acceptance_tests.rs | ||
assertion_line: 88 | ||
expression: output | ||
--- | ||
running 6 tests | ||
running 9 tests | ||
test descriptions::_expects_inconclusive_ ... ignored, reason but no comment | ||
test descriptions::ignore_keyword ... ignored, reason and comment | ||
test descriptions::test_is_not_run ... ignored, reason and comment | ||
test ignore_void::_1_expects_inconclusiveempty ... ignored | ||
test ignore_void::_2_expects_inconclusiveempty ... ignored | ||
test inconclusives::_expects_inconclusive_ ... ignored | ||
test inconclusives::ignore_keyword ... ignored | ||
test inconclusives::inconclusive_test ... ignored | ||
test inconclusives::test_is_not_ran ... ignored | ||
test result: ok. 0 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 0.00s | ||
test result: ok. 0 passed; 0 failed; 9 ignored; 0 measured; 0 filtered out; finished in 0.00s |