aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/zlib/deflate/set_dictionary_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/zlib/deflate/set_dictionary_spec.rb')
-rw-r--r--spec/ruby/library/zlib/deflate/set_dictionary_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/library/zlib/deflate/set_dictionary_spec.rb b/spec/ruby/library/zlib/deflate/set_dictionary_spec.rb
new file mode 100644
index 0000000000..c5c62d9529
--- /dev/null
+++ b/spec/ruby/library/zlib/deflate/set_dictionary_spec.rb
@@ -0,0 +1,15 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+require 'zlib'
+
+describe "Zlib::Deflate#set_dictionary" do
+ it "sets the dictionary" do
+ d = Zlib::Deflate.new
+ d.set_dictionary 'aaaaaaaaaa'
+ d << 'abcdefghij'
+
+ d.finish.should == [120, 187, 20, 225, 3, 203, 75, 76,
+ 74, 78, 73, 77, 75, 207, 200, 204,
+ 2, 0, 21, 134, 3, 248].pack('C*')
+ end
+end
+