about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs
blob: 8519920e53bef92c89c74282e376d9040b75b43a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
/// #[cfg(testcase_must_be_present)]
/// #[cfg(another)]
/// fn must_be_present() {}
///
/// fn main() { must_be_present() }
/// ```
pub struct Bar;