File: html4_test.rb

package info (click to toggle)
libhtmlentities-ruby 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 136 kB
  • ctags: 294
  • sloc: ruby: 2,172; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'htmlentities'
require 'test/unit'

$KCODE = 'u'

class HTMLEntities::HTML4Test < Test::Unit::TestCase

  attr_reader :html_entities

  def setup
    @html_entities = HTMLEntities.new('html4')
  end

  # Found by Marcos Kuhns
  def test_should_not_encode_apos_entity
    assert_equal "'", html_entities.encode("'", :basic)
  end

  def test_should_not_decode_apos_entity
    assert_equal "é&apos;", html_entities.decode("&eacute;&apos;")
  end

end