test/test_idgxmlbuilder.rb in review-2.2.0 vs test/test_idgxmlbuilder.rb in review-2.3.0

- old
+ new

@@ -44,11 +44,10 @@ def test_headline_level3 actual = compile_block("==={test} this is test.\n") assert_equal %Q|<title id="test" aid:pstyle="h3">this is test.</title><?dtp level="3" section="this is test."?>|, actual end - def test_headline_level3_with_secno @config["secnolevel"] = 3 actual = compile_block("==={test} this is test.\n") assert_equal %Q|<title id="test" aid:pstyle="h3">1.0.1 this is test.</title><?dtp level="3" section="1.0.1 this is test."?>|, actual end @@ -136,10 +135,16 @@ @config["pt_to_mm_unit"] = "0.3514" actual = compile_block("//table{\nA\n//}\n") assert_equal %Q|<table><tbody xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="1" aid:tcols="1"><td xyh="1,1,0" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="28.458">A</td></tbody></table>|, actual end + def test_emtable + actual = compile_block("//emtable[foo]{\nA\n//}\n//emtable{\nA\n//}") + assert_equal %Q|<table><caption>foo</caption><tbody xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="1" aid:tcols="1"><td xyh="1,1,0" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="28.345">A</td></tbody></table><table><tbody xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="1" aid:tcols="1"><td xyh="1,1,0" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="28.345">A</td></tbody></table>|, + actual + end + def test_inline_br actual = compile_inline("@<br>{}") assert_equal %Q|\n|, actual end @@ -181,10 +186,15 @@ def test_inline_m actual = compile_inline("@<m>{\\sin} @<m>{\\frac{1\\}{2\\}}") assert_equal %Q|<replace idref="texinline-1"><pre>\\sin</pre></replace> <replace idref="texinline-2"><pre>\\frac{1}{2}</pre></replace>|, actual end + def test_dlist_beforeulol + actual = compile_block(" : foo\n foo.\n\npara\n\n : foo\n foo.\n\n 1. bar\n\n : foo\n foo.\n\n * bar\n") + assert_equal %Q|<dl><dt>foo</dt><dd>foo.</dd></dl><p>para</p><dl><dt>foo</dt><dd>foo.</dd></dl><ol><li aid:pstyle="ol-item" olnum="1" num="1">bar</li></ol><dl><dt>foo</dt><dd>foo.</dd></dl><ul><li aid:pstyle="ul-item">bar</li></ul>|, actual + end + def test_paragraph actual = compile_block("foo\nbar\n") assert_equal %Q|<p>foobar</p>|, actual end @@ -656,10 +666,9 @@ actual = compile_block "@<imgref>{sampleimg}\n" expected = "<p><span type='image'>図1.1</span></p>" assert_equal expected, actual end - def test_block_raw0 actual = compile_block("//raw[<>!\"\\n& ]\n") expected = %Q(<>!\"\n& ) assert_equal expected, actual