diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2016-12-22 13:49:53 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2016-12-22 14:16:05 +0100 |
commit | e619345766e98578929061e566178010c171df48 (patch) | |
tree | 844c71a6842608ca78a244bfd1caaf50cfc92c2e /askama_test/tests/simple.rs | |
download | askama-e619345766e98578929061e566178010c171df48.tar.gz askama-e619345766e98578929061e566178010c171df48.tar.bz2 askama-e619345766e98578929061e566178010c171df48.zip |
Initial stab at macros 1.1
Diffstat (limited to '')
-rw-r--r-- | askama_test/tests/simple.rs | 18 |
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"); +} |