diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-11-04 22:36:45 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-11-04 22:36:45 +0100 |
commit | 6c442903c6b9656318b13aba0875d204b7427497 (patch) | |
tree | 53d7b90577901e2df59d480f08f8753ed10c169a /testing/tests | |
parent | 8edf5dea2a3f2c5c3a3a13dfa525662ee390e213 (diff) | |
download | askama-6c442903c6b9656318b13aba0875d204b7427497.tar.gz askama-6c442903c6b9656318b13aba0875d204b7427497.tar.bz2 askama-6c442903c6b9656318b13aba0875d204b7427497.zip |
Disable tests that need dependencies by default
Diffstat (limited to 'testing/tests')
-rw-r--r-- | testing/tests/filters.rs | 4 | ||||
-rw-r--r-- | testing/tests/iron.rs | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs index 8c654c1..d6e9782 100644 --- a/testing/tests/filters.rs +++ b/testing/tests/filters.rs @@ -1,9 +1,11 @@ #[macro_use] extern crate askama; +#[cfg(feature = "serde-json")] #[macro_use] extern crate serde_json; use askama::Template; +#[cfg(feature = "serde-json")] use serde_json::Value; #[derive(Template)] @@ -87,6 +89,7 @@ fn test_vec_join() { assert_eq!(t.render().unwrap(), "foo, bar, bazz"); } +#[cfg(feature = "serde-json")] #[derive(Template)] #[template(path = "json.html")] struct JsonTemplate<'a> { @@ -94,6 +97,7 @@ struct JsonTemplate<'a> { bar: &'a Value, } +#[cfg(feature = "serde-json")] #[test] fn test_json() { let val = json!({"arr": [ "one", 2, true, null ]}); diff --git a/testing/tests/iron.rs b/testing/tests/iron.rs index 95c366c..10dcee3 100644 --- a/testing/tests/iron.rs +++ b/testing/tests/iron.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "iron")] #[macro_use] extern crate askama; extern crate iron; |