Skip to content

Commit b5b148e

Browse files
authored
The Zlib::GzipReader in JRuby does not behave as expected with REXML, so the test is skipped (#292)
## Why? JRuby's `Zlib::GzipReader#readline` does not support arguments, so when using `Zlib::GzipReader.open`, it always returns an empty string and does not function. We will temporarily exclude `Zlib::GzipReader` from test coverage. ``` $ test/run.rb --location test/test_order.rb:49 Failure: test_more_ordering(REXMLTests::OrderTester) /Users/naitoh/ghq/github.com/naitoh/rexml/test/test_order.rb:110:in `test_more_ordering' 107: count += 1 108: } 109: => 110: assert_equal( actual.size, count ) 111: end if defined?(Zlib::GzipReader) 112: end 113: end <46> expected but was <0> ``` See: jruby/jruby#8997
1 parent 1531862 commit b5b148e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/test_order.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def test_order
4747
end
4848
# Provided by Tom Talbott
4949
def test_more_ordering
50+
omit("not supported on JRuby") if RUBY_ENGINE == "jruby"
51+
5052
doc = Zlib::GzipReader.open(fixture_path('LostineRiver.kml.gz'), encoding: 'utf-8') do |f|
5153
REXML::Document.new(f)
5254
end
@@ -104,6 +106,8 @@ def test_more_ordering
104106
assert_equal( actual[count], n ) unless n =~ /Arrive at/
105107
count += 1
106108
}
109+
110+
assert_equal( actual.size, count )
107111
end if defined?(Zlib::GzipReader)
108112
end
109113
end

0 commit comments

Comments
 (0)