Sha256: 48bc67da8887c985e8d44d65acc47ca48bf0ac62200a9f6c904dae8ab0a09df2

Contents?: true

Size: 395 Bytes

Versions: 4

Compression:

Stored size: 395 Bytes

Contents

require 'zlib'

describe "Zlib::Inflate#set_dictionary" do
  it "sets the inflate dictionary" do
    deflated = "x\273\024\341\003\313KLJNIMK\317\310\314\002\000\025\206\003\370"

    i = Zlib::Inflate.new

    begin
      i << deflated
      flunk 'Zlib::NeedDict not raised'
    rescue Zlib::NeedDict
      i.set_dictionary 'aaaaaaaaaa'
    end

    i.finish.should == 'abcdefghij'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubysl-zlib-1.0.1 spec/inflate/set_dictionary_spec.rb
rubysl-zlib-2.0.1 spec/inflate/set_dictionary_spec.rb
rubysl-zlib-1.0.0 spec/inflate/set_dictionary_spec.rb
rubysl-zlib-2.0.0 spec/inflate/set_dictionary_spec.rb