From e619345766e98578929061e566178010c171df48 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 22 Dec 2016 13:49:53 +0100 Subject: Initial stab at macros 1.1 --- askama_test/tests/simple.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 askama_test/tests/simple.rs (limited to 'askama_test/tests/simple.rs') 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"); +} -- cgit