diff options
Diffstat (limited to 'testing/tests/ui')
-rw-r--r-- | testing/tests/ui/elif.rs | 8 | ||||
-rw-r--r-- | testing/tests/ui/elif.stderr | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testing/tests/ui/elif.rs b/testing/tests/ui/elif.rs new file mode 100644 index 0000000..650f292 --- /dev/null +++ b/testing/tests/ui/elif.rs @@ -0,0 +1,8 @@ +use askama::Template; + +#[derive(Template)] +#[template(source = "{% if true %}{% elif false %}{% endif %}", ext = "html")] +struct UnknownElif; + +fn main() { +} diff --git a/testing/tests/ui/elif.stderr b/testing/tests/ui/elif.stderr new file mode 100644 index 0000000..0d5de47 --- /dev/null +++ b/testing/tests/ui/elif.stderr @@ -0,0 +1,9 @@ +error: unknown `elif` keyword; did you mean `else if`? + problems parsing template source at row 1, column 16 near: + "elif false %}{% endif %}" + --> tests/ui/elif.rs:3:10 + | +3 | #[derive(Template)] + | ^^^^^^^^ + | + = note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info) |