Skip Windows tests in non-Windows environment.

This commit is contained in:
Heng Kwokfu 2016-09-24 21:55:02 +08:00
parent db53213d16
commit bacb300876
1 changed files with 22 additions and 20 deletions

View File

@ -29,6 +29,7 @@ class TestPathSanitization < JekyllUnitTest
Jekyll.sanitized_path(source_dir, "f./../../../../../../files/hi.txt") Jekyll.sanitized_path(source_dir, "f./../../../../../../files/hi.txt")
end end
if Jekyll::Utils::Platforms.really_windows?
context "on Windows with absolute path" do context "on Windows with absolute path" do
setup do setup do
@base_path = "D:/demo" @base_path = "D:/demo"
@ -54,6 +55,7 @@ class TestPathSanitization < JekyllUnitTest
Jekyll.sanitized_path(@base_path, @file_path) Jekyll.sanitized_path(@base_path, @file_path)
end end
end end
end
should "not strip base path if file path has matching prefix" do should "not strip base path if file path has matching prefix" do
assert_equal "/site/sitemap.xml", assert_equal "/site/sitemap.xml",