Sha256: f7e82eaaf94e394fa232a06c67cfa59f99d25519f1c3f1049c98b670b1888ed3

Contents?: true

Size: 746 Bytes

Versions: 107

Compression:

Stored size: 746 Bytes

Contents

# -*- coding: utf-8 -*-

require "helper"

module Nokogiri
  module XML
    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

Version data entries

107 entries across 100 versions & 10 rubygems

Version Path
tdiary-5.0.11 vendor/bundle/gems/nokogiri-1.8.4/test/xml/test_dtd_encoding.rb
tdiary-5.0.11 vendor/bundle/gems/nokogiri-1.8.5/test/xml/test_dtd_encoding.rb
nokogiri-1.9.0.rc1 test/xml/test_dtd_encoding.rb
nokogiri-1.9.0.rc1-x86-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.9.0.rc1-x64-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.9.0.rc1-java test/xml/test_dtd_encoding.rb
nokogiri-1.8.5 test/xml/test_dtd_encoding.rb
nokogiri-1.8.5-x86-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.8.5-x64-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.8.5-java test/xml/test_dtd_encoding.rb
daslabs-0.12.0 vendor/cache/ruby/2.5.0/gems/nokogiri-1.8.2/test/xml/test_dtd_encoding.rb
daslabs-0.11.0 vendor/cache/ruby/2.5.0/gems/nokogiri-1.8.2/test/xml/test_dtd_encoding.rb
nokogiri-1.8.4 test/xml/test_dtd_encoding.rb
nokogiri-1.8.4-x86-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.8.4-x64-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.8.4-java test/xml/test_dtd_encoding.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.3/test/xml/test_dtd_encoding.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.3/test/xml/test_dtd_encoding.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.3/test/xml/test_dtd_encoding.rb
tdiary-5.0.9 vendor/bundle/gems/nokogiri-1.8.2/test/xml/test_dtd_encoding.rb