diff options
Diffstat (limited to 'spec/ruby/library/zlib/zstream/flush_next_out_spec.rb')
-rw-r--r-- | spec/ruby/library/zlib/zstream/flush_next_out_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/ruby/library/zlib/zstream/flush_next_out_spec.rb b/spec/ruby/library/zlib/zstream/flush_next_out_spec.rb new file mode 100644 index 0000000000..8ba8414cd1 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/flush_next_out_spec.rb @@ -0,0 +1,16 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require 'zlib' + +describe "Zlib::ZStream#flush_next_out" do + + it "flushes the stream and flushes the output buffer" do + zs = Zlib::Inflate.new + zs << [120, 156, 75, 203, 207, 7, 0, 2, 130, 1, 69].pack('C*') + + zs.flush_next_out.should == 'foo' + zs.finished?.should == true + zs.flush_next_out.should == '' + end +end + + |