File: tc_sgml_parser.rb

package info (click to toggle)
ruby-feedparser 0.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: ruby: 1,871; sh: 24; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 465 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
# encoding: UTF-8

require 'test/unit'
require 'mocha/test_unit'

require 'feedparser/sgml-parser'

class SGMLParserTest < Test::Unit::TestCase

  def test_numerical_charref
    parser = FeedParser::SGMLParser.new
    parser.expects(:unknown_charref).with('215')
    parser.handle_charref('215')
  end

  def test_non_numerical_charref
    parser = FeedParser::SGMLParser.new
    parser.expects(:handle_data).with('amp')
    parser.handle_charref('amp')
  end

end