Skip to content

Commit

Permalink
Split up the hidden entry/find_entry tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Jun 26, 2014
1 parent bd8f7f5 commit 178042b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test/tc_managed_entries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,24 +208,31 @@ def test_hidden_entries
refute(c.hidden_entry?("src"))
refute(c.hidden_file?("src"))
refute(c.hidden_directory?("src"))
assert_not_nil(c.find_entry("src"))
assert_not_nil(c.find_entry("src", :include_hidden => true))

assert(c.hidden_entry?("test"))
assert(c.hidden_directory?("test"))
assert(c.hidden_entry?("test/"))
assert(c.hidden_directory?("test/"))
refute(c.hidden_file?("test"))

assert_nil(c.find_entry("test"))
assert_nil(c.find_entry("test/test.txt"))
assert_not_nil(c.find_entry("test", :include_hidden => true))
assert_not_nil(c.find_entry("test/test.txt", :include_hidden => true))

assert(c.hidden_entry?("test/deep"))
assert(c.hidden_directory?("test/deep"))
assert(c.hidden_entry?("test/deep/deep.txt"))
assert(c.hidden_file?("test/deep/deep.txt"))
end
end
end

def test_find_entry
assert_nothing_raised do
ManagedZipContainer.open($subclass) do |c|
assert_not_nil(c.find_entry("src"))
assert_not_nil(c.find_entry("src", :include_hidden => true))

assert_nil(c.find_entry("test"))
assert_nil(c.find_entry("test/test.txt"))
assert_not_nil(c.find_entry("test", :include_hidden => true))
assert_not_nil(c.find_entry("test/test.txt", :include_hidden => true))

assert_nil(c.find_entry("test/deep"))
assert_nil(c.find_entry("test/deep/deep.txt"))
Expand Down

0 comments on commit 178042b

Please sign in to comment.