Skip to content

Commit

Permalink
test: updating tests to match xalan 2.7.3 behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed May 9, 2023
1 parent e3daaf4 commit a3af6d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion test/test_xslt_transforms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ def test_non_html_xslt_transform
# note that here the XPath 2.0 feature is `decimal`.
# this test case is taken from the example provided in the original issue.
#
# also: xalan 2.7.3 seems to understand the XPath 2.0 expression
#
skip_unless_libxml2("testing a crash that only happened with libxml2")

xml = <<~EOXML
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
Expand Down Expand Up @@ -356,7 +360,7 @@ def test_non_html_xslt_transform
)
else
assert_match(
/xmlXPathCompOpEval: function decimal not found|java.lang.NoSuchMethodException.*decimal/,
/xmlXPathCompOpEval: function decimal not found/,
exception.message,
)
end
Expand Down
3 changes: 1 addition & 2 deletions test/xslt/test_exception_handling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def test_java_exception_handling
xsl.transform(xml)
end

assert_match(/Can't have more than one root/, e.to_s,
"The exception message does not contain the expected information")
assert_includes(e.to_s, "HIERARCHY_REQUEST_ERR")
end
end
end
Expand Down

0 comments on commit a3af6d1

Please sign in to comment.