We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 782d228 commit 4466ea0Copy full SHA for 4466ea0
tests/rustdoc-ui/doctest/rustflags.rs
@@ -0,0 +1,13 @@
1
+//@ check-pass
2
+//@ compile-flags: --test
3
+//@ rustc-env:RUSTFLAGS=--cfg=testcase_must_be_present
4
+//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
5
+//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
6
+
7
+/// ```
8
+/// #[cfg(testcase_must_be_present)]
9
+/// fn must_be_present() {}
10
+///
11
+/// fn main() { must_be_present() }
12
13
+pub struct Bar;
tests/rustdoc-ui/doctest/rustflags.stdout
@@ -0,0 +1,6 @@
+running 1 test
+test $DIR/rustflags.rs - Bar (line 7) ... ok
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
0 commit comments