aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-10 23:45:57 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-10 23:45:57 -0400
commitac17e24feca48ee347fc1dbd376beaee7907a75c (patch)
tree3a110a545d8e1ef06d5233d14c96b12b705121b6 /spec
parent82dafe047ec701ecd8d62c8088152fe2c4ab1a5d (diff)
downloadzip-crystal-ac17e24feca48ee347fc1dbd376beaee7907a75c.tar.bz2
zip-crystal-ac17e24feca48ee347fc1dbd376beaee7907a75c.zip
add dir?
Diffstat (limited to 'spec')
-rw-r--r--spec/zip_spec.cr13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/zip_spec.cr b/spec/zip_spec.cr
index 01a98ff..0ca4e86 100644
--- a/spec/zip_spec.cr
+++ b/spec/zip_spec.cr
@@ -91,12 +91,15 @@ describe Zip do
it "reads all an archive's compressed entries" do
Zip.read(File.join(TEST_DIR, "test-many.zip")) do |zip|
zip.each do |e|
- pp e.path
- io = MemoryIO.new
- # e.write(STDOUT)
- e.write(io)
- io.close
+ if e.dir?
+ puts "#{e.path} is a directory"
+ else
+ io = MemoryIO.new
+ # e.write(STDOUT)
+ e.write(io)
+ io.close
+ end
end
end
end