Add test to ensure passing --doctest_compilation_args
multiple times work
This commit is contained in:
parent
bc03e40a29
commit
2d914bed2d
3 changed files with 24 additions and 1 deletions
17
tests/rustdoc-ui/doctest/rustflags-multiple-args.rs
Normal file
17
tests/rustdoc-ui/doctest/rustflags-multiple-args.rs
Normal file
|
@ -0,0 +1,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;
|
Loading…
Add table
Add a link
Reference in a new issue