File: tc_html_parser_context.rb

package info (click to toggle)
ruby-libxml 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,812 kB
  • sloc: xml: 9,628; ruby: 7,119; ansic: 6,665; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# encoding: UTF-8

require './test_helper'

require 'test/unit'

class TestHtmlParserContext < Test::Unit::TestCase
  def test_default_options
    context = XML::HTMLParser::Context.new
    assert_equal(0, context.options)
  end

  def test_no_options
    context = XML::HTMLParser::Context.new
    context.options = 0
    assert_equal(0, context.options)
  end

  def test_options
    context = XML::HTMLParser::Context.new
    context.options = XML::HTMLParser::Options::NOERROR
    assert_equal(XML::HTMLParser::Options::NOERROR, context.options)
  end
end