mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 15:25:19 +00:00

rust-lang/rust#82069 made error message that stem macro invocations more verbose. Since Rust 1.54 (currently in beta) the message includes the name of the offending macro. This PR uses version_check to select the appropriate expected error message.
15 lines
338 B
Rust
15 lines
338 B
Rust
use trybuild::TestCases;
|
|
use version_check as rustc;
|
|
|
|
#[cfg_attr(not(windows), test)]
|
|
fn ui() {
|
|
let t = TestCases::new();
|
|
t.compile_fail("tests/ui/*.rs");
|
|
|
|
if rustc::is_min_version("1.54").unwrap() {
|
|
t.compile_fail("tests/ui/since_1_54/*.rs");
|
|
} else {
|
|
t.compile_fail("tests/ui/before_1_54/*.rs");
|
|
}
|
|
}
|