File tree Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ running 7 tests
3+ test $DIR/no-run.rs - f (line 12) - compile ... ok
4+ test $DIR/no-run.rs - f (line 15) - compile ... ok
5+ test $DIR/no-run.rs - f (line 18) ... ignored
6+ test $DIR/no-run.rs - f (line 21) - compile ... ok
7+ test $DIR/no-run.rs - f (line 27) - compile fail ... ok
8+ test $DIR/no-run.rs - f (line 32) - compile ... ok
9+ test $DIR/no-run.rs - f (line 36) - compile ... ok
10+
11+ test result: ok. 6 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
12+
Original file line number Diff line number Diff line change 1+
2+ running 5 tests
3+ test $DIR/no-run.rs - f (line 12) - compile ... ok
4+ test $DIR/no-run.rs - f (line 15) - compile ... ok
5+ test $DIR/no-run.rs - f (line 21) - compile ... ok
6+ test $DIR/no-run.rs - f (line 32) - compile ... ok
7+ test $DIR/no-run.rs - f (line 36) - compile ... ok
8+
9+ test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
10+
11+
12+ running 2 tests
13+ test $DIR/no-run.rs - f (line 18) ... ignored
14+ test $DIR/no-run.rs - f (line 27) - compile fail ... ok
15+
16+ test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
17+
Original file line number Diff line number Diff line change 1+ // This test ensures that the `--no-run` flag works the same between normal and merged doctests.
2+ // Regression test for <https://github.com/rust-lang/rust/issues/143858>.
3+
4+ //@ check-pass
5+ //@ revisions: edition2021 edition2024
6+ //@ [edition2021]edition:2021
7+ //@ [edition2024]edition:2024
8+ //@ compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
9+ //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
10+ //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
11+
12+ /// ```
13+ /// let a = true;
14+ /// ```
15+ /// ```should_panic
16+ /// panic!()
17+ /// ```
18+ /// ```ignore (incomplete-code)
19+ /// fn foo() {
20+ /// ```
21+ /// ```no_run
22+ /// loop {
23+ /// println!("Hello, world");
24+ /// }
25+ /// ```
26+ /// fails to compile
27+ /// ```compile_fail
28+ /// let x = 5;
29+ /// x += 2; // shouldn't compile!
30+ /// ```
31+ /// Ok the test does not run
32+ /// ```
33+ /// panic!()
34+ /// ```
35+ /// Ok the test does not run
36+ /// ```should_panic
37+ /// loop {
38+ /// println!("Hello, world");
39+ /// panic!()
40+ /// }
41+ /// ```
42+ pub fn f ( ) { }
You can’t perform that action at this time.
0 commit comments