Sha256: 0d0b219efec3520f982e7259b44ed564dd04081cbf518baae810ee3a281127da
Contents?: true
Size: 817 Bytes
Versions: 25
Compression:
Stored size: 817 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', "helper")) module Nokogiri module XML if RUBY_VERSION =~ /^1\.9/ class TestDTDEncoding < Nokogiri::TestCase def setup super @xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE, 'UTF-8') assert @dtd = @xml.internal_subset end def test_entities @dtd.entities.each do |k,v| assert_equal @xml.encoding, k.encoding.name end end def test_notations @dtd.notations.each do |k,notation| assert_equal 'UTF-8', k.encoding.name %w{ name public_id system_id }.each do |attribute| v = notation.send(:"#{attribute}") || next assert_equal 'UTF-8', v.encoding.name end end end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems