test/test_topbuilder.rb in review-4.0.0 vs test/test_topbuilder.rb in review-4.1.0
- old
+ new
@@ -172,10 +172,23 @@
EOS
assert_equal expected, actual
end
+ def test_dt_inline
+ fn = Book::FootnoteIndex.parse(['//footnote[bar][bar]'])
+ @chapter.instance_eval { @footnote_index = fn }
+ actual = compile_block(" : foo@<fn>{bar}[]<>&@<m>$\\alpha[]$\n")
+
+ expected = <<-EOS
+★foo【注1】[]<>&◆→TeX式ここから←◆\\alpha[]◆→TeX式ここまで←◆☆
+
+
+EOS
+ assert_equal expected, actual
+ end
+
def test_paragraph
actual = compile_block("foo\nbar\n")
assert_equal %Q(foobar\n), actual
@book.config['join_lines_by_lang'] = true
@@ -458,9 +471,55 @@
◆→終了:表←◆
◆→開始:表←◆
★aaa☆\t★bbb☆
ccc\tddd<>&
+◆→終了:表←◆
+
+EOS
+ assert_equal expected, actual
+ end
+
+ def test_table_row_separator
+ src = "//table{\n1\t2\t\t3 4| 5\n------------\na b\tc d |e\n//}\n"
+ expected = <<-EOS
+◆→開始:表←◆
+★1☆ ★2☆ ★3 4| 5☆
+a b c d |e
+◆→終了:表←◆
+
+EOS
+ actual = compile_block(src)
+ assert_equal expected, actual
+
+ @config['table_row_separator'] = 'singletab'
+ actual = compile_block(src)
+ expected = <<-EOS
+◆→開始:表←◆
+★1☆ ★2☆ ★☆ ★3 4| 5☆
+a b c d |e
+◆→終了:表←◆
+
+EOS
+ assert_equal expected, actual
+
+ @config['table_row_separator'] = 'spaces'
+ actual = compile_block(src)
+ expected = <<-EOS
+◆→開始:表←◆
+★1☆ ★2☆ ★3☆ ★4|☆ ★5☆
+a b c d |e
+◆→終了:表←◆
+
+EOS
+ assert_equal expected, actual
+
+ @config['table_row_separator'] = 'verticalbar'
+ actual = compile_block(src)
+ expected = <<-EOS
+◆→開始:表←◆
+★1 2 3 4☆ ★5☆
+a b c d e
◆→終了:表←◆
EOS
assert_equal expected, actual
end