We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What problems are you experiencing?
XML::Reader does not return parse errors on JRuby (though it does with libxml2/MRI).
XML::Reader
What's the output from nokogiri -v?
nokogiri -v
# Nokogiri (1.7.0) --- warnings: [] nokogiri: 1.7.0 ruby: version: 2.3.1 platform: java description: jruby 9.1.6.0 (2.3.1) 2016-11-09 0150a76 OpenJDK 64-Bit Server VM 25.111-b14 on 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14 [linux-x86_64] engine: jruby jruby: 9.1.6.0 xerces: Xerces-J 2.11.0 nekohtml: NekoHTML 1.9.21
Can you provide a self-contained script that reproduces what you're seeing?
these tests are in test/xml/test_reader.rb already, I've ommitted the skip:
test/xml/test_reader.rb
skip
def test_errors_is_an_array # skip "TODO: xerces does not internally call `errors`" if Nokogiri.jruby? reader = Nokogiri::XML::Reader(StringIO.new('&bogus;')) assert_raises(SyntaxError) { reader.read } assert_equal [SyntaxError], reader.errors.map(&:class) end def test_pushing_to_non_array_raises_TypeError # skip "TODO: xerces does not internally call `errors`" if Nokogiri.jruby? reader = Nokogiri::XML::Reader(StringIO.new('&bogus;')) def reader.errors 1 end assert_raises(TypeError) { reader.read } end
and the failures are:
1) Failure: Nokogiri::XML::TestReader#test_pushing_to_non_array_raises_TypeError [test/xml/test_reader.rb:203]: [TypeError] exception expected, not Class: <Nokogiri::XML::SyntaxError> Message: <"Nokogiri::XML::SyntaxError"> ---Backtrace--- nokogiri/XmlReader.java:355:in `read' test/xml/test_reader.rb:204:in `block in test_pushing_to_non_array_raises_TypeError' --------------- 2) Failure: Nokogiri::XML::TestReader#test_errors_is_an_array [test/xml/test_reader.rb:194]: Expected: [Nokogiri::XML::SyntaxError] Actual: []
this has been a known problem since @knu spotted this in 0af5a8e.
The text was updated successfully, but these errors were encountered:
076c3c6
No branches or pull requests
What problems are you experiencing?
XML::Reader
does not return parse errors on JRuby (though it does with libxml2/MRI).What's the output from
nokogiri -v
?Can you provide a self-contained script that reproduces what you're seeing?
these tests are in
test/xml/test_reader.rb
already, I've ommitted theskip
:and the failures are:
this has been a known problem since @knu spotted this in 0af5a8e.
The text was updated successfully, but these errors were encountered: