Skip to content

Commit

Permalink
making the parser quiet, fixing exception names
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Aug 31, 2008
1 parent b953845 commit c28bfab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ruby/helper.rb
Expand Up @@ -25,9 +25,10 @@ def preload(content_type, doc_uri, will_be_modified)
end

def load_document(doc_uri, will_be_modified)
options = self.class.name =~ /attrdefaultvalue/i ? 13 : 5
options = self.class.name =~ /attrdefaultvalue/i ? 15 : 3
options |= (1 << 5 | 1 << 6)
file = File.join(BASE,'tests','level1','core','files',"#{doc_uri}.xml")
Nokogiri::XML.parse(File.read(file), file, nil, options)
Nokogiri.parse(File.read(file), file, nil, options)
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions transforms/test-to-ruby.xsl
Expand Up @@ -1378,7 +1378,7 @@ require 'helper'
<xsl:text>.size()</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>.getLength()</xsl:text>
<xsl:text>.length</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>)
Expand Down Expand Up @@ -1620,7 +1620,7 @@ require 'helper'
begin
<xsl:apply-templates mode="body">
<xsl:with-param name="vardefs" select="$vardefs"/>
</xsl:apply-templates> rescue DOMException => ex
</xsl:apply-templates> rescue Nokogiri::XML::DOMException => ex
# allow to fall through and fail test
rescue EventException => ex
# allow to fall through and fail test
Expand All @@ -1640,8 +1640,8 @@ require 'helper'
begin
<xsl:apply-templates select="*/*" mode="body">
<xsl:with-param name="vardefs" select="$vardefs"/>
</xsl:apply-templates>rescue DOMException => ex
success = (ex.code == DOMException::<xsl:value-of select="name(*)"/>)
</xsl:apply-templates>rescue Nokogiri::XML::DOMException => ex
success = (ex.code == Nokogiri::XML::DOMException::<xsl:value-of select="name(*)"/>)
end
assert(success, "<xsl:value-of select="@id"/>")
end
Expand Down

0 comments on commit c28bfab

Please sign in to comment.