Sha256: 2957834cfc59f6c566c7e9ee2e90c38018a1f134de6e99ce268d14be24ccadcb

Contents?: true

Size: 539 Bytes

Versions: 6

Compression:

Stored size: 539 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', "helper"))

require 'nkf'

module Nokogiri
  module HTML
    class TestNode < Nokogiri::TestCase
      def test_to_html_does_not_contain_entities
        html = NKF.nkf("-e --msdos", <<-EOH)
        <html><body>
        <p> test paragraph
        foo bar </p>
        </body></html>
        EOH
        nokogiri = Nokogiri::HTML.parse(html)

        assert_equal "<p>testparagraph\r\nfoobar</p>",
          nokogiri.at("p").to_html.gsub(/ /, '')
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nokogiri-1.2.0-java test/html/test_node.rb
nokogiri-1.2.0-x86-mswin32-60 test/html/test_node.rb
nokogiri-1.2.0 test/html/test_node.rb
nokogiri-1.2.1-java test/html/test_node.rb
nokogiri-1.2.1-x86-mswin32-60 test/html/test_node.rb
nokogiri-1.2.1 test/html/test_node.rb