askama/testing/tests/path.rs
2025-08-13 11:20:49 +02:00

12 lines
324 B
Rust
Raw Blame History

use askama::Template;
// Ensure that paths starting with `::` are supported correctly.
#[test]
fn test_path_starting_with_colon() {
#[derive(Template)]
#[template(source = r#"<EFBFBD><EFBFBD><EFBFBD>{{::std::format!("")}}<7D> <20>t<EFBFBD>"#, ext = "txt")]
struct X;
assert_eq!(X.render().unwrap(), "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>t<EFBFBD>");
}