mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add regression test for --doctest-compilation-args
This commit is contained in:
committed by
Guillaume Gomez
parent
05731afff2
commit
2bd869082b
@@ -0,0 +1,12 @@
|
||||
//@ check-pass
|
||||
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// #[cfg(testcase_must_be_present)]
|
||||
/// fn must_be_present() {}
|
||||
///
|
||||
/// fn main() { must_be_present() }
|
||||
/// ```
|
||||
pub struct Bar;
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/rustflags.rs - Bar (line 6) ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
Reference in New Issue
Block a user