aboutsummaryrefslogtreecommitdiffstats
path: root/askama_test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_test/Cargo.toml9
-rw-r--r--askama_test/tests/simple.rs18
2 files changed, 27 insertions, 0 deletions
diff --git a/askama_test/Cargo.toml b/askama_test/Cargo.toml
new file mode 100644
index 0000000..8d01793
--- /dev/null
+++ b/askama_test/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "askama_test"
+version = "0.1.0"
+authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
+workspace = ".."
+
+[dependencies]
+askama_codegen = { path = "../askama_codegen" }
+askama = { path = "../askama" }
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");
+}