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

#setupObject



223
224
225
226
# File 'ext/chapterparse/test/test_parser.rb', line 223

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

#test_parse__h2Object



227
228
229
230
231
232
233
234
235
236
# File 'ext/chapterparse/test/test_parser.rb', line 227

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