From 04b5b0920731edf70629f8b5a52991f41f8c4066 Mon Sep 17 00:00:00 2001 From: Kogia-sima Date: Sun, 7 Jun 2020 05:36:32 +0900 Subject: [PATCH] Ignore include-nest tests on Windows On Windows the main separator for paths is '\\', and include! macro should be regarded as platform-specific path. In the future sailfish add the corresponding tests for Windows. --- integration-tests/tests/basic.rs | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/integration-tests/tests/basic.rs b/integration-tests/tests/basic.rs index 2716e84..6f7471f 100644 --- a/integration-tests/tests/basic.rs +++ b/integration-tests/tests/basic.rs @@ -91,17 +91,6 @@ fn test_include() { assert_render("include", Include { strs: &["foo", "bar"] }); } -#[derive(TemplateOnce)] -#[template(path = "include-nest.stpl")] -struct IncludeNest<'a> { - s: &'a str, -} - -#[test] -fn test_include_nest() { - assert_render("include-nest", IncludeNest { s: "foo" }); -} - #[derive(TemplateOnce)] #[template(path = "big-table.stpl")] struct BigTable { @@ -152,3 +141,19 @@ fn test_teams() { }; assert_render("teams", teams); } + +#[cfg(unix)] +mod unix { + use super::*; + + #[derive(TemplateOnce)] + #[template(path = "include-nest.stpl")] + struct IncludeNest<'a> { + s: &'a str, + } + + #[test] + fn test_include_nest() { + assert_render("include-nest", IncludeNest { s: "foo" }); + } +}