about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest/macro-after-main.rs
blob: 0a42343f1c2724a710e0c1d70f9c7185bd93dffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This test checks a corner case where the macro calls used to be skipped,
// making them considered as statement, and therefore some cases where
// `include!` macro was then put into a function body, making the doctest
// compilation fail.

//@ compile-flags:--test
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass

//! ```
//! include!("./auxiliary/macro-after-main.rs");
//!
//! fn main() {}
//! eprintln!();
//! ```