Sha256: c9f788914afd4b120e3bd6caec27489b6dfd328e27267584f8a143d683308bd6

Contents?: true

Size: 744 Bytes

Versions: 21

Compression:

Stored size: 744 Bytes

Contents

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

class TestBuilder < Nokogiri::TestCase
  ####
  # Modified
  def test_escaping_text
    doc = Nokogiri.Hpricot() { b "<a\"b>" }
    assert_equal "<b>&lt;a\"b&gt;</b>", doc.to_html.chomp
    assert_equal %{&lt;a\"b&gt;}, doc.at("text()").to_s
  end

  ####
  # Modified
  def test_no_escaping_text
    doc = Nokogiri.Hpricot() { div.test.me! { text "<a\"b>" } }
    assert_equal %{<div class="test" id="me">&lt;a"b&gt;</div>},
      doc.to_html.chomp
    assert_equal %{&lt;a\"b&gt;}, doc.at("text()").to_s
  end

  ####
  # Modified
  def test_latin1_entities
    doc = Nokogiri.Hpricot() { b "\200\225" }
    assert_equal "<b>&#21;</b>", doc.to_html.chomp
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
tenderlove-nokogiri-0.0.0-x86-mswin32-60 test/hpricot/test_builder.rb
tenderlove-nokogiri-0.0.0.20081001111445 test/hpricot/test_builder.rb
nokogiri-1.0.0 test/hpricot/test_builder.rb
nokogiri-1.0.0-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.0.1 test/hpricot/test_builder.rb
nokogiri-1.0.3-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.0.4 test/hpricot/test_builder.rb
nokogiri-1.0.5-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.0.3 test/hpricot/test_builder.rb
nokogiri-1.0.2 test/hpricot/test_builder.rb
nokogiri-1.0.4-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.0.5 test/hpricot/test_builder.rb
nokogiri-1.0.6-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.0.6 test/hpricot/test_builder.rb
nokogiri-1.1.0 test/hpricot/test_builder.rb
nokogiri-1.1.0-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.1.1-java test/hpricot/test_builder.rb
nokogiri-1.0.7 test/hpricot/test_builder.rb
nokogiri-1.0.7-x86-mswin32-60 test/hpricot/test_builder.rb
nokogiri-1.1.1-x86-mswin32-60 test/hpricot/test_builder.rb