Skip to content

Commit 61c5343

Browse files
Add FIXME comments to use test::ERROR_EXIT_CODE once public and fix typo
1 parent c365e6e commit 61c5343

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/librustdoc/doctest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ fn run_test(
827827
match result {
828828
Err(e) => return (duration, Err(TestFailure::ExecutionError(e))),
829829
Ok(out) => {
830+
// FIXME: use test::ERROR_EXIT_CODE once public
830831
if langstr.should_panic && out.status.code() != Some(101) {
831832
return (duration, Err(TestFailure::UnexpectedRunPass));
832833
} else if !langstr.should_panic && !out.status.success() {

src/librustdoc/doctest/runner.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ mod __doctest_mod {{
143143
.output()
144144
.expect(\"failed to run command\");
145145
if should_panic {{
146+
// FIXME: use test::ERROR_EXIT_CODE once public
146147
if out.status.code() != Some(101) {{
147148
eprintln!(\"Test didn't panic, but it's marked `should_panic`.\");
148149
ExitCode::FAILURE

tests/run-make/rustdoc-should-panic/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Test didn't panic, but it's marked `should_panic`.",
1919
for text in should_contain {
2020
assert!(
2121
output.contains(text),
22-
"output doesn't contains (edition: {edition}) {:?}\nfull output: {output}",
22+
"output (edition: {edition}) doesn't contain {:?}\nfull output: {output}",
2323
text
2424
);
2525
}

0 commit comments

Comments
 (0)