8000 Add test case based on #146 · rubyzip/rubyzip@eeef507 · GitHub
[go: up one dir, main page]

Skip to content

Commit eeef507

Browse files
committed
Add test case based on #146
1 parent 7fbaf1e commit eeef507

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/file_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ def test_close_buffer_with_io
131131
f.close
132132
end
133133

134+
def test_open_buffer_with_io_and_block
135+
File.open('test/data/rubycode.zip') do |io|
136+
io.set_encoding(Encoding::BINARY) # not strictly required but can be set
137+
Zip::File.open_buffer(io) do |zip_io|
138+
# left empty on purpose
139+
end
140+
end
141+
end
142+
134143
def test_open_buffer_without_block
135144
string_io = StringIO.new File.read('test/data/rubycode.zip')
136145
zf = ::Zip::File.open_buffer string_io

0 commit comments

Comments
 (0)
0