Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

without rubyzip, skip zip test #714

Merged
merged 1 commit into from
Dec 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions test/test_zip_exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,23 @@ def test_export_zipcmd
exporter.export_zip_extcmd(epubfile)
assert_true(File.exist?(epubfile))

File.open(epubfile) do |f|
::Zip::InputStream.open(f) do |fzip|
## get first entry
entry = fzip.get_next_entry
assert_equal "mimetype", entry.name
assert_equal "application/epub+zip", fzip.read
if defined?(Zip)
File.open(epubfile) do |f|
::Zip::InputStream.open(f) do |fzip|
## get first entry
entry = fzip.get_next_entry
assert_equal "mimetype", entry.name
assert_equal "application/epub+zip", fzip.read
end
end
end
end

def test_export_rubyzip
if !defined?(Zip)
## skip test
return
end
params = {"epubmaker"=>{}}
epubfile = File.join(@tmpdir, "test.epub")
exporter = ZipExporter.new(@epubdir, params)
Expand Down