Skip to content

Commit

Permalink
Add ui test for filter recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Apr 5, 2024
1 parent b31d0c9 commit f6dd29a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions testing/tests/ui/filter-recursion.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use askama::Template;

#[derive(Template)]
#[template(source = "{{ s|a|a|a|a|a|a|a|A|a|a|a|a|a|a|a|a|a|a|a|a|a", ext = "txt")]
struct Filtered {
s: &'static str,
}

fn main() {}
8 changes: 8 additions & 0 deletions testing/tests/ui/filter-recursion.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: problems parsing template source at row 1, column 46 near:
""
--> tests/ui/filter-recursion.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)

0 comments on commit f6dd29a

Please sign in to comment.