Skip to content

Commit 7b8015c

Browse files
Add FIXME comments to use test::ERROR_EXIT_CODE once public and fix typo
1 parent 0a01e8e commit 7b8015c

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
@@ -828,6 +828,7 @@ fn run_test(
828828
match result {
829829
Err(e) => return (duration, Err(TestFailure::ExecutionError(e))),
830830
Ok(out) => {
831+
// FIXME: use test::ERROR_EXIT_CODE once public
831832
if langstr.should_panic && out.status.code() != Some(101) {
832833
return (duration, Err(TestFailure::UnexpectedRunPass));
833834
} 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)