Skip to content

Commit

Permalink
Don't set test_harness to true by default as it would generate in…
Browse files Browse the repository at this point in the history
…valid code for combined doctests
  • Loading branch information
GuillaumeGomez committed Apr 16, 2024
1 parent ed3fb4b commit 7796f3f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ impl LangString {
no_run: false,
ignore: Ignore::None,
rust: true,
test_harness: true,
test_harness: false,
compile_fail: false,
error_codes: Vec::new(),
edition: None,
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/doctest/cfg-test.stdout
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

running 2 tests
test $DIR/cfg-test.rs - Foo (line 19) ... ok
test $DIR/cfg-test.rs - Bar (line 27) ... ok
test $DIR/cfg-test.rs - Foo (line 19) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME

2 changes: 1 addition & 1 deletion tests/rustdoc-ui/doctest/doctest-output.stdout
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

running 3 tests
test $DIR/doctest-output.rs - (line 8) ... ok
test $DIR/doctest-output.rs - foo::bar (line 18) ... ok
test $DIR/doctest-output.rs - ExpandedStruct (line 24) ... ok
test $DIR/doctest-output.rs - foo::bar (line 18) ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME

2 changes: 1 addition & 1 deletion tests/rustdoc-ui/doctest/no-run-flag.stdout
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

running 6 tests
test $DIR/no-run-flag.rs - f (line 14) ... ignored
test $DIR/no-run-flag.rs - f (line 11) ... ok
test $DIR/no-run-flag.rs - f (line 14) ... ignored
test $DIR/no-run-flag.rs - f (line 17) ... ok
test $DIR/no-run-flag.rs - f (line 28) ... ok
test $DIR/no-run-flag.rs - f (line 32) ... ok
Expand Down

0 comments on commit 7796f3f

Please sign in to comment.