Sha256: fff3f06085a982b4792b0ab6fd5183c24f37c9997b88c2e5da3aed1112670650

Contents?: true

Size: 783 Bytes

Versions: 340

Compression:

Stored size: 783 Bytes

Contents

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

require "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

340 entries across 340 versions & 34 rubygems

Version Path
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/test/xml/test_dtd_encoding.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/test/xml/test_dtd_encoding.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/test/xml/test_dtd_encoding.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.1/test/xml/test_dtd_encoding.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/test/xml/test_dtd_encoding.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/test/xml/test_dtd_encoding.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/test/xml/test_dtd_encoding.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/test/xml/test_dtd_encoding.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.2/test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.2 test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.2-x86-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.2-x64-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.2-java test/xml/test_dtd_encoding.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/nokogiri-1.6.6.2/test/xml/test_dtd_encoding.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.7.1/test/xml/test_dtd_encoding.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/nokogiri-1.6.6.2/test/xml/test_dtd_encoding.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/nokogiri-1.6.6.2/test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.1 test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.1-x86-mingw32 test/xml/test_dtd_encoding.rb
nokogiri-1.6.7.1-x64-mingw32 test/xml/test_dtd_encoding.rb