This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ // test the behavior of the --no-run flag
2+
3+ // check-pass
4+ // compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
5+ // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
6+ // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
7+
8+ /// ```
9+ /// let a = true;
10+ /// ```
11+ /// ```should_panic
12+ /// panic!()
13+ /// ```
14+ /// ```ignore
15+ /// fn foo() {
16+ /// ```
17+ /// ```no_run
18+ /// loop {
19+ /// println!("Hello, world");
20+ /// }
21+ /// ```
22+ /// fails to compile
23+ /// ```compile_fail
24+ /// let x = 5;
25+ /// x += 2; // shouldn't compile!
26+ /// ```
27+ /// Ok the test does not run
28+ /// ```
29+ /// panic!()
30+ /// ```
31+ /// Ok the test does not run
32+ /// ```should_panic
33+ /// loop {
34+ /// println!("Hello, world");
35+ /// panic!()
36+ /// }
37+ /// ```
38+ pub fn f ( ) { }
Original file line number Diff line number Diff line change 1+
2+ running 7 tests
3+ test $DIR/no-run-flag.rs - f (line 11) ... ok
4+ test $DIR/no-run-flag.rs - f (line 14) ... ignored
5+ test $DIR/no-run-flag.rs - f (line 17) ... ok
6+ test $DIR/no-run-flag.rs - f (line 23) ... ok
7+ test $DIR/no-run-flag.rs - f (line 28) ... ok
8+ test $DIR/no-run-flag.rs - f (line 32) ... ok
9+ test $DIR/no-run-flag.rs - f (line 8) ... ok
10+
11+ test result: ok. 6 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
12+
You can’t perform that action at this time.
0 commit comments