diff options
Diffstat (limited to '')
-rw-r--r-- | testing/templates/literals.html | 1 | ||||
-rw-r--r-- | testing/tests/simple.rs | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/testing/templates/literals.html b/testing/templates/literals.html new file mode 100644 index 0000000..b8d8fbe --- /dev/null +++ b/testing/templates/literals.html @@ -0,0 +1 @@ +{{ "a" }} diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index 63203e7..2aa93ea 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -79,3 +79,14 @@ fn test_for() { }; assert_eq!(s.render(), "\n A\n\n alfa\n\n 1\n\n"); } + + +#[derive(Template)] +#[template(path = "literals.html")] +struct LiteralsTemplate {} + +#[test] +fn test_literals() { + let s = LiteralsTemplate {}; + assert_eq!(s.render(), "a\n"); +} |