From 744b290c8d34c905f285c4b6e675e42281e83204 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 3 Jan 2017 10:06:47 +0100 Subject: Rename askama_test to testing --- Cargo.toml | 2 +- askama_test/Cargo.toml | 9 --------- askama_test/templates/simple.html | 4 ---- askama_test/tests/simple.rs | 28 ---------------------------- testing/Cargo.toml | 9 +++++++++ testing/templates/simple.html | 4 ++++ testing/tests/simple.rs | 28 ++++++++++++++++++++++++++++ 7 files changed, 42 insertions(+), 42 deletions(-) delete mode 100644 askama_test/Cargo.toml delete mode 100644 askama_test/templates/simple.html delete mode 100644 askama_test/tests/simple.rs create mode 100644 testing/Cargo.toml create mode 100644 testing/templates/simple.html create mode 100644 testing/tests/simple.rs diff --git a/Cargo.toml b/Cargo.toml index 3192c8a..a63c3e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,2 +1,2 @@ [workspace] -members = ["askama", "askama_derive", "askama_test"] +members = ["askama", "askama_derive", "testing"] diff --git a/askama_test/Cargo.toml b/askama_test/Cargo.toml deleted file mode 100644 index 63896b7..0000000 --- a/askama_test/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "askama_test" -version = "0.1.0" -authors = ["Dirkjan Ochtman "] -workspace = ".." - -[dependencies] -askama_derive = { path = "../askama_derive" } -askama = { path = "../askama" } diff --git a/askama_test/templates/simple.html b/askama_test/templates/simple.html deleted file mode 100644 index 51e225b..0000000 --- a/askama_test/templates/simple.html +++ /dev/null @@ -1,4 +0,0 @@ -hello world, {{ strvar }} -with number: {{ num }} -Iñtërnâtiônàlizætiøn is important -in vars too: {{ i18n }} diff --git a/askama_test/tests/simple.rs b/askama_test/tests/simple.rs deleted file mode 100644 index 0943f12..0000000 --- a/askama_test/tests/simple.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![feature(proc_macro)] - -#[macro_use] -extern crate askama_derive; -extern crate askama; - -use askama::Template; - -#[derive(Template)] -#[template(path = "simple.html")] -struct TestTemplate { - strvar: String, - num: i64, - i18n: String, -} - -#[test] -fn it_works() { - let s = TestTemplate { - strvar: "foo".to_string(), - num: 42, - i18n: "Iñtërnâtiônàlizætiøn".to_string(), - }; - assert_eq!(s.render(), "hello world, foo\n\ - with number: 42\n\ - Iñtërnâtiônàlizætiøn is important\n\ - in vars too: Iñtërnâtiônàlizætiøn\n"); -} diff --git a/testing/Cargo.toml b/testing/Cargo.toml new file mode 100644 index 0000000..8e7c0f3 --- /dev/null +++ b/testing/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "askama_testing" +version = "0.1.0" +authors = ["Dirkjan Ochtman "] +workspace = ".." + +[dependencies] +askama = { path = "../askama" } +askama_derive = { path = "../askama_derive" } diff --git a/testing/templates/simple.html b/testing/templates/simple.html new file mode 100644 index 0000000..51e225b --- /dev/null +++ b/testing/templates/simple.html @@ -0,0 +1,4 @@ +hello world, {{ strvar }} +with number: {{ num }} +Iñtërnâtiônàlizætiøn is important +in vars too: {{ i18n }} diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs new file mode 100644 index 0000000..0943f12 --- /dev/null +++ b/testing/tests/simple.rs @@ -0,0 +1,28 @@ +#![feature(proc_macro)] + +#[macro_use] +extern crate askama_derive; +extern crate askama; + +use askama::Template; + +#[derive(Template)] +#[template(path = "simple.html")] +struct TestTemplate { + strvar: String, + num: i64, + i18n: String, +} + +#[test] +fn it_works() { + let s = TestTemplate { + strvar: "foo".to_string(), + num: 42, + i18n: "Iñtërnâtiônàlizætiøn".to_string(), + }; + assert_eq!(s.render(), "hello world, foo\n\ + with number: 42\n\ + Iñtërnâtiônàlizætiøn is important\n\ + in vars too: Iñtërnâtiônàlizætiøn\n"); +} -- cgit