From e6b9dd1cc147a881ef39b36977c705ef2b76c63c Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 2 Nov 2016 12:54:47 +0530 Subject: [PATCH] TestFilters: adjust array size to ignore symlinks Adjust the size of grouped-items array as it won't include symlinked pages in Windows. --- test/test_filters.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test_filters.rb b/test/test_filters.rb index 9a0f87d4..20587610 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -575,7 +575,9 @@ class TestFilters < JekyllUnitTest g["items"].is_a?(Array), "The list of grouped items for 'default' is not an Array." ) - assert_equal 5, g["items"].size + # adjust array.size to ignore symlinked page in Windows + qty = Utils::Platforms.really_windows? ? 4 : 5 + assert_equal qty, g["items"].size when "nil" assert( g["items"].is_a?(Array), @@ -587,7 +589,9 @@ class TestFilters < JekyllUnitTest g["items"].is_a?(Array), "The list of grouped items for '' is not an Array." ) - assert_equal 15, g["items"].size + # adjust array.size to ignore symlinked page in Windows + qty = Utils::Platforms.really_windows? ? 14 : 15 + assert_equal qty, g["items"].size end end end