test/test_markdownbuilder.rb in review-3.2.0 vs test/test_markdownbuilder.rb in review-4.0.0

- old
+ new

@@ -26,10 +26,21 @@ > > buz EOS assert_equal expected, actual + + @book.config['join_lines_by_lang'] = true + actual = compile_block("//quote{\nfoo\nbar\n\nbuz\n//}\n") + expected = <<-EOS + +> foo bar +> +> buz + +EOS + assert_equal expected, actual end def test_memo actual = compile_block("//memo[this is @<b>{test}<&>_]{\ntest1\n\ntest@<i>{2}\n//}\n") expected = <<-EOS @@ -49,10 +60,20 @@ foo2bar2 EOS assert_equal expected, actual + + @book.config['join_lines_by_lang'] = true + actual = compile_block("//noindent\nfoo\nbar\n\nfoo2\nbar2\n") + expected = <<-EOS +<p class="noindent">foo bar</p> + +foo2 bar2 + +EOS + assert_equal expected, actual end def test_inline_em assert_equal 'test*foo*abc', compile_inline('test@<em>{foo}abc') end @@ -103,33 +124,53 @@ EOS assert_equal expected, actual end def test_dlist - actual = compile_block(": foo\n foo.\n bar.\n") + actual = compile_block(" : foo\n foo.\n bar.\n") expected = <<-EOS <dl> <dt>foo</dt> <dd>foo.bar.</dd> </dl> EOS assert_equal expected, actual + + @book.config['join_lines_by_lang'] = true + actual = compile_block(" : foo\n foo.\n bar.\n") + expected = <<-EOS +<dl> +<dt>foo</dt> +<dd>foo. bar.</dd> +</dl> +EOS + assert_equal expected, actual end def test_dlist_with_bracket - actual = compile_block(": foo[bar]\n foo.\n bar.\n") + actual = compile_block(" : foo[bar]\n foo.\n bar.\n") expected = <<-EOS <dl> <dt>foo[bar]</dt> <dd>foo.bar.</dd> </dl> EOS assert_equal expected, actual + + @book.config['join_lines_by_lang'] = true + actual = compile_block(" : foo[bar]\n foo.\n bar.\n") + expected = <<-EOS +<dl> +<dt>foo[bar]</dt> +<dd>foo. bar.</dd> +</dl> +EOS + assert_equal expected, actual end def test_dlist_with_comment - source = ": title\n body\n\#@ comment\n\#@ comment\n: title2\n body2\n" + source = " : title\n body\n\#@ comment\n\#@ comment\n: title2\n body2\n" actual = compile_block(source) expected = <<-EOS <dl> <dt>title</dt> <dd>body</dd> @@ -187,10 +228,10 @@ EOS end def test_listnum def @chapter.list(_id) - Book::ListIndex::Item.new('test', 1) + Book::Index::Item.new('test', 1) end actual = compile_block("//listnum[test][this is @<b>{test}<&>_]{\nfoo\nbar\n\tbuz\n//}\n") expected = <<-EOS リスト1.1 this is **test**<&>_