Skip to content

Commit

Permalink
fix test for java
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanong committed Oct 18, 2024
1 parent 5e579ee commit 06e0f3e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/xml/test_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,17 @@ class TestNokogiriXMLSchema < Nokogiri::TestCase

assert(errors = xsd.validate(doc))
assert_equal(2, errors.length)
assert_equal(
["/purchaseOrder/billTo/state", "/purchaseOrder/shipTo/state"],
errors.map(&:path).sort,
)
if Nokogiri.uses_libxml?
assert_equal(
["/purchaseOrder/billTo/state", "/purchaseOrder/shipTo/state"],
errors.map(&:path).sort,
)
else
assert_equal(
[nil, nil],
errors.map(&:path).sort,
)
end
end

it "validate_invalid_file" do
Expand Down

0 comments on commit 06e0f3e

Please sign in to comment.