2024-12-20 15:39:26 +01:00
|
|
|
// This test checks that the test behave when `--doctest-compilation-args` is passed
|
|
|
|
// multiple times.
|
|
|
|
|
|
|
|
//@ check-pass
|
|
|
|
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
|
|
|
|
//@ compile-flags: --doctest-compilation-args=--cfg=another
|
2024-12-25 22:12:17 +11:00
|
|
|
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
|
|
|
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
2024-12-20 15:39:26 +01:00
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// #[cfg(testcase_must_be_present)]
|
|
|
|
/// #[cfg(another)]
|
|
|
|
/// fn must_be_present() {}
|
|
|
|
///
|
|
|
|
/// fn main() { must_be_present() }
|
|
|
|
/// ```
|
|
|
|
pub struct Bar;
|