Class: ODDB::ChapterParse::TestParserCopyPasteOpenOffice

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
ext/chapterparse/test/test_parser.rb

Defined Under Namespace

Classes: Formatter

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



239
240
241
242
# File 'ext/chapterparse/test/test_parser.rb', line 239

def setup
  @formatter = Formatter.new
  @parser = Parser.new(@formatter)
end

- (Object) test_parse__h2



243
244
245
246
247
248
249
250
# File 'ext/chapterparse/test/test_parser.rb', line 243

def test_parse__h2
  src="<h2>Text\n"
  @parser.feed(src)
  assert_equal([[nil, 1, nil, nil]],
    @formatter.font_stack)
  @parser.feed('</h2>')
  assert_equal([], @formatter.font_stack)
end