aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/templates/tuple-attr.html1
-rw-r--r--testing/tests/simple.rs12
2 files changed, 13 insertions, 0 deletions
diff --git a/testing/templates/tuple-attr.html b/testing/templates/tuple-attr.html
new file mode 100644
index 0000000..4a7d781
--- /dev/null
+++ b/testing/templates/tuple-attr.html
@@ -0,0 +1 @@
+{{ tuple.0 }}{{ tuple.1 }}
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index eac7c4b..d2111f0 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -93,6 +93,18 @@ fn test_attr() {
assert_eq!(t.render().unwrap(), "5");
}
+#[derive(Template)]
+#[template(path = "tuple-attr.html")]
+struct TupleAttrTemplate<'a> {
+ tuple: (&'a str, &'a str),
+}
+
+#[test]
+fn test_tuple_attr() {
+ let t = TupleAttrTemplate { tuple: ("foo", "bar") };
+ assert_eq!(t.render().unwrap(), "foobar");
+}
+
struct NestedHolder {
holder: Holder,