diff options
Diffstat (limited to 'tests/rustdoc-ui/doctest/rustflags-multiple-args.rs')
| -rw-r--r-- | tests/rustdoc-ui/doctest/rustflags-multiple-args.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs b/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs new file mode 100644 index 00000000000..8519920e53b --- /dev/null +++ b/tests/rustdoc-ui/doctest/rustflags-multiple-args.rs @@ -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; |
