Skip to content

Commit

Permalink
Assertion for EntryFilter#glob_include? _not_dir case
Browse files Browse the repository at this point in the history
  • Loading branch information
billykong committed Apr 13, 2020
1 parent d2b639e commit bf91700
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
File renamed without changes.
Empty file.
9 changes: 4 additions & 5 deletions test/test_entry_filter.rb
Expand Up @@ -151,11 +151,10 @@ class TestEntryFilter < JekyllUnitTest
end

should "match directory only if there is trailing slash" do
data = ["../_glob_include_test/", "_not_dir/"]
assert @filter.glob_include?(data, "../_glob_include_test")
assert @filter.glob_include?(data, "../_glob_include_test/include_me.txt")
assert !@filter.glob_include?(data, "../_not_dir")
data = ["../_glob_include_test/_is_dir/", "../_glob_include_test/_not_dir/"]
assert @filter.glob_include?(data, "../_glob_include_test/_is_dir")
assert @filter.glob_include?(data, "../_glob_include_test/_is_dir/include_me.txt")
assert !@filter.glob_include?(data, "../_glob_include_test/_not_dir")
end

end
end

0 comments on commit bf91700

Please sign in to comment.