rust/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs
León Orell Valerian Liehr 307a67a02a
Replace flag --doctest-compilation-args with a simpler one: --doctest-build-arg
More notably, the value of the new flag does *not* get lexed shell-like and ad hoc.
2025-04-15 15:44:45 +02:00

17 lines
547 B
Rust

// This test checks that the test behave when `--doctest-build-arg` is passed multiple times.
//@ check-pass
//@ compile-flags: --test -Zunstable-options --doctest-build-arg=--cfg=testcase_must_be_present
//@ compile-flags: --doctest-build-arg=--cfg=another
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "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;