aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/simple.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/tests/simple.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index 2aa93ea..00acda5 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -90,3 +90,20 @@ fn test_literals() {
let s = LiteralsTemplate {};
assert_eq!(s.render(), "a\n");
}
+
+
+struct Holder {
+ a: usize,
+}
+
+#[derive(Template)]
+#[template(path = "attr.html")]
+struct AttrTemplate {
+ inner: Holder,
+}
+
+#[test]
+fn test_attr() {
+ let t = AttrTemplate { inner: Holder { a: 5 } };
+ assert_eq!(t.render(), "5\n");
+}