askama/testing/tests/ui/macro-caller-with-callexpr.rs
2025-07-21 16:55:31 +02:00

19 lines
318 B
Rust

use askama::Template;
// Calling into a macro that expects content (`caller`) using
// the call-expr syntax should fail
#[derive(Template)]
#[template(
source = r#"
{% macro testmacro() %}
{{caller()}}
{% endmacro %}
{{ testmacro() }}
"#,
ext = "txt"
)]
struct MacroCallerWithCallExpr;
fn main() {}