From e40b9e98148312f2a8a830cd97babea73a0dcb3e Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 3 Aug 2016 16:00:20 +0200 Subject: [PATCH] fix skeptic --- serde_macros/Cargo.toml | 6 ++++++ serde_macros/build.rs | 5 +++-- serde_macros/tests/skeptic.rs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/serde_macros/Cargo.toml b/serde_macros/Cargo.toml index 264f2dac..4791f416 100644 --- a/serde_macros/Cargo.toml +++ b/serde_macros/Cargo.toml @@ -18,6 +18,7 @@ plugin = true unstable-testing = [ "clippy", "skeptic", + "serde_json", "serde/unstable-testing", "serde_codegen/unstable-testing" ] @@ -29,6 +30,7 @@ skeptic = { version = "^0.6.0", optional = true } clippy = { version = "^0.*", optional = true } serde_codegen = { version = "=0.8.0", default-features = false, features = ["unstable"] } skeptic = { version = "^0.6.0", optional = true } +serde_json = { version = "0.8.0", optional = true } [dev-dependencies] clippy = "^0.*" @@ -42,6 +44,10 @@ serde_test = "0.8.0" name = "test" path = "tests/test.rs" +[[test]] +name = "skeptic" +path = "tests/skeptic.rs" + [[bench]] name = "bench" path = "benches/bench.rs" diff --git a/serde_macros/build.rs b/serde_macros/build.rs index b7320275..0f545500 100644 --- a/serde_macros/build.rs +++ b/serde_macros/build.rs @@ -1,13 +1,14 @@ -#[cfg(feature = "nightly-testing")] +#[cfg(feature = "unstable-testing")] mod inner { extern crate skeptic; pub fn main() { + println!("cargo:rerun-if-changed=../README.md"); skeptic::generate_doc_tests(&["../README.md"]); } } -#[cfg(not(feature = "nightly-testing"))] +#[cfg(not(feature = "unstable-testing"))] mod inner { pub fn main() {} } diff --git a/serde_macros/tests/skeptic.rs b/serde_macros/tests/skeptic.rs index 39a3a51d..47e632d0 100644 --- a/serde_macros/tests/skeptic.rs +++ b/serde_macros/tests/skeptic.rs @@ -1,3 +1,3 @@ -#![cfg(feature = "nightly-testing")] +#![cfg(feature = "unstable-testing")] include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs"));