Add tests for new exclude behaviour.
This commit is contained in:
parent
35868807c1
commit
366f9268ee
|
@ -83,6 +83,12 @@ class TestCoreExt < Test::Unit::TestCase
|
||||||
assert data.glob_include?("c/a/a.txt")
|
assert data.glob_include?("c/a/a.txt")
|
||||||
assert data.glob_include?("c/a/b/a.txt")
|
assert data.glob_include?("c/a/b/a.txt")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "match even if there is no leading slash" do
|
||||||
|
data = ['vendor/bundle']
|
||||||
|
assert data.glob_include?('/vendor/bundle')
|
||||||
|
assert data.glob_include?('vendor/bundle')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,8 +18,8 @@ class TestEntryFilter < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "filter entries with exclude" do
|
should "filter entries with exclude" do
|
||||||
excludes = %w[README TODO]
|
excludes = %w[README TODO vendor/bundle]
|
||||||
files = %w[index.html site.css .htaccess]
|
files = %w[index.html site.css .htaccess vendor]
|
||||||
|
|
||||||
@site.exclude = excludes + ["exclude*"]
|
@site.exclude = excludes + ["exclude*"]
|
||||||
assert_equal files, @site.filter_entries(excludes + files + ["excludeA"])
|
assert_equal files, @site.filter_entries(excludes + files + ["excludeA"])
|
||||||
|
|
Loading…
Reference in New Issue