TestSite: add symlinked files only if not Windows
add symlinked files to "sorted_pages" array only when testing on non-windows platforms.
This commit is contained in:
parent
0c234c90a9
commit
257e60b9a7
|
@ -175,7 +175,8 @@ class TestSite < JekyllUnitTest
|
||||||
method.call(*args, &block).reverse
|
method.call(*args, &block).reverse
|
||||||
end
|
end
|
||||||
@site.process
|
@site.process
|
||||||
# files in symlinked directories may appear twice
|
# exclude files in symlinked directories here and insert them in the
|
||||||
|
# following step when not on Windows.
|
||||||
sorted_pages = %w(
|
sorted_pages = %w(
|
||||||
%#\ +.md
|
%#\ +.md
|
||||||
.htaccess
|
.htaccess
|
||||||
|
@ -194,12 +195,14 @@ class TestSite < JekyllUnitTest
|
||||||
index.html
|
index.html
|
||||||
info.md
|
info.md
|
||||||
main.scss
|
main.scss
|
||||||
main.scss
|
|
||||||
properties.html
|
properties.html
|
||||||
sitemap.xml
|
sitemap.xml
|
||||||
static_files.html
|
static_files.html
|
||||||
symlinked-file
|
|
||||||
)
|
)
|
||||||
|
unless Utils::Platforms.really_windows?
|
||||||
|
# files in symlinked directories may appear twice
|
||||||
|
sorted_pages.push("main.scss", "symlinked-file").sort!
|
||||||
|
end
|
||||||
assert_equal sorted_pages, @site.pages.map(&:name)
|
assert_equal sorted_pages, @site.pages.map(&:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue