diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-08-07 08:51:05 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-08-07 08:51:05 -0400 |
commit | f35828b7f33e88565d1c2a86a9815718f94014cb (patch) | |
tree | 1ef3181d63f579394ae09070f7f2c4bf95ba134c /spec | |
parent | 02de1031ed14e738447090300fd490416059cf53 (diff) | |
download | zip-crystal-f35828b7f33e88565d1c2a86a9815718f94014cb.tar.bz2 zip-crystal-f35828b7f33e88565d1c2a86a9815718f94014cb.zip |
add none test
Diffstat (limited to 'spec')
-rw-r--r-- | spec/zip_spec.cr | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/zip_spec.cr b/spec/zip_spec.cr index d132c1c..83d0dcc 100644 --- a/spec/zip_spec.cr +++ b/spec/zip_spec.cr @@ -24,6 +24,16 @@ describe Zip::Writer do end end + it "creates an entry from a String with no compression" do + Zip.write(File.join(TEST_DIR, "test-string-none.zip")) do |zip| + zip.add( + path: "bar.txt", + data: "bar", + method: Zip::CompressionMethod::NONE + ) + end + end + it "creates an entry from a MemoryIO" do Zip.write(File.join(TEST_DIR, "test-memio.zip")) do |zip| zip.add("bar.txt", "bar") |