diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
commit | 1d15d5f08032acf1b7bceacbb450d617ff6e0931 (patch) | |
tree | a3785a79899302bc149e4a6e72f624ac27dc1f10 /spec/ruby/library/zlib/zstream | |
parent | 75bfc6440d595bf339007f4fb280fd4d743e89c1 (diff) |
Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory.
[Misc #13792] [ruby-core:82287]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library/zlib/zstream')
-rw-r--r-- | spec/ruby/library/zlib/zstream/adler_spec.rb | 11 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/avail_in_spec.rb | 9 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/avail_out_spec.rb | 9 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/close_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/closed_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/data_type_spec.rb | 9 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/end_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/ended_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/finish_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/finished_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/flush_next_in_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/flush_next_out_spec.rb | 16 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/reset_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/stream_end_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/total_in_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/zstream/total_out_spec.rb | 1 |
16 files changed, 65 insertions, 0 deletions
diff --git a/spec/ruby/library/zlib/zstream/adler_spec.rb b/spec/ruby/library/zlib/zstream/adler_spec.rb new file mode 100644 index 0000000000..e562fd260e --- /dev/null +++ b/spec/ruby/library/zlib/zstream/adler_spec.rb @@ -0,0 +1,11 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require 'zlib' + +describe "Zlib::ZStream#adler" do + it "generates hash" do + z = Zlib::Deflate.new + z << "foo" + z.finish + z.adler.should == 0x02820145 + end +end diff --git a/spec/ruby/library/zlib/zstream/avail_in_spec.rb b/spec/ruby/library/zlib/zstream/avail_in_spec.rb new file mode 100644 index 0000000000..25d3219a5a --- /dev/null +++ b/spec/ruby/library/zlib/zstream/avail_in_spec.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require 'zlib' + +describe "Zlib::ZStream#avail_in" do + it "returns bytes in the input buffer" do + z = Zlib::Deflate.new + z.avail_in.should == 0 + end +end diff --git a/spec/ruby/library/zlib/zstream/avail_out_spec.rb b/spec/ruby/library/zlib/zstream/avail_out_spec.rb new file mode 100644 index 0000000000..c747bbbc2f --- /dev/null +++ b/spec/ruby/library/zlib/zstream/avail_out_spec.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require 'zlib' + +describe "Zlib::ZStream#avail_out" do + it "returns bytes in the output buffer" do + z = Zlib::Deflate.new + z.avail_out.should == 0 + end +end diff --git a/spec/ruby/library/zlib/zstream/close_spec.rb b/spec/ruby/library/zlib/zstream/close_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/close_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/closed_spec.rb b/spec/ruby/library/zlib/zstream/closed_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/closed_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/data_type_spec.rb b/spec/ruby/library/zlib/zstream/data_type_spec.rb new file mode 100644 index 0000000000..614f0d10a2 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/data_type_spec.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../../../spec_helper', __FILE__) +require 'zlib' + +describe "Zlib::ZStream#data_type" do + it "returns the type of the data in the stream" do + z = Zlib::Deflate.new + [Zlib::ASCII, Zlib::BINARY, Zlib::UNKNOWN].include?(z.data_type).should == true + end +end diff --git a/spec/ruby/library/zlib/zstream/end_spec.rb b/spec/ruby/library/zlib/zstream/end_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/end_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/ended_spec.rb b/spec/ruby/library/zlib/zstream/ended_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/ended_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/finish_spec.rb b/spec/ruby/library/zlib/zstream/finish_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/finish_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/finished_spec.rb b/spec/ruby/library/zlib/zstream/finished_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/finished_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/flush_next_in_spec.rb b/spec/ruby/library/zlib/zstream/flush_next_in_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/flush_next_in_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) 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 + + diff --git a/spec/ruby/library/zlib/zstream/reset_spec.rb b/spec/ruby/library/zlib/zstream/reset_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/reset_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/stream_end_spec.rb b/spec/ruby/library/zlib/zstream/stream_end_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/stream_end_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/total_in_spec.rb b/spec/ruby/library/zlib/zstream/total_in_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/total_in_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) diff --git a/spec/ruby/library/zlib/zstream/total_out_spec.rb b/spec/ruby/library/zlib/zstream/total_out_spec.rb new file mode 100644 index 0000000000..6a4c1dadb4 --- /dev/null +++ b/spec/ruby/library/zlib/zstream/total_out_spec.rb @@ -0,0 +1 @@ +require File.expand_path('../../../../spec_helper', __FILE__) |