test/test_latexbuilder.rb in review-5.2.0 vs test/test_latexbuilder.rb in review-5.3.0
- old
+ new
@@ -255,10 +255,24 @@
def test_inline_ttb
actual = compile_inline('test @<ttb>{inline test} test2')
assert_equal 'test \\reviewttb{inline test} test2', actual
end
+ def test_endnote
+ e = assert_raises(ReVIEW::ApplicationError) { compile_block("//endnote[foo][bar]\n\n@<endnote>{foo}\n") }
+ assert_equal ':4: //endnote is found but //printendnotes is not found.', e.message
+
+ actual = compile_block("@<endnote>{foo}\n//endnote[foo][bar]\n//printendnotes\n")
+ expected = <<-'EOS'
+
+\endnote{bar}
+
+\theendnotes
+EOS
+ assert_equal expected, actual
+ end
+
def test_inline_hd_chap
def @chapter.headline_index
item = Book::Index::Item.new('chap1|test', [1, 1], 'te_st')
idx = Book::HeadlineIndex.new(self)
idx.add_item(item)
@@ -2594,11 +2608,11 @@
def test_nest_error_close1
src = <<-EOS
//beginchild
EOS
e = assert_raises(ReVIEW::ApplicationError) { compile_block(src) }
- assert_equal "//beginchild is shown, but previous element isn't ul, ol, or dl", e.message
+ assert_equal ":1: //beginchild is shown, but previous element isn't ul, ol, or dl", e.message
end
def test_nest_error_close2
src = <<-EOS
* foo
@@ -2612,11 +2626,11 @@
: foo
//beginchild
EOS
e = assert_raises(ReVIEW::ApplicationError) { compile_block(src) }
- assert_equal '//beginchild of dl,ol,ul misses //endchild', e.message
+ assert_equal ':12: //beginchild of dl,ol,ul misses //endchild', e.message
end
def test_nest_error_close3
src = <<-EOS
* foo
@@ -2632,10 +2646,10 @@
//beginchild
//endchild
EOS
e = assert_raises(ReVIEW::ApplicationError) { compile_block(src) }
- assert_equal '//beginchild of ol,ul misses //endchild', e.message
+ assert_equal ':14: //beginchild of ol,ul misses //endchild', e.message
end
def test_nest_ul
src = <<-EOS
* UL1