aboutsummaryrefslogtreecommitdiffstats
path: root/askama_test/tests/simple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'askama_test/tests/simple.rs')
-rw-r--r--askama_test/tests/simple.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/askama_test/tests/simple.rs b/askama_test/tests/simple.rs
new file mode 100644
index 0000000..f7beb80
--- /dev/null
+++ b/askama_test/tests/simple.rs
@@ -0,0 +1,18 @@
+#![feature(proc_macro)]
+
+#[macro_use]
+extern crate askama_codegen;
+extern crate askama;
+
+use askama::Template;
+
+#[derive(Template)]
+struct TestTemplate {
+ var: String,
+}
+
+#[test]
+fn it_works() {
+ let s = TestTemplate { var: "foo".to_string() }.render();
+ assert_eq!(s, "hello world, foo");
+}