diff options
Diffstat (limited to 'test/rdoc/test_rdoc_markup.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup.rb | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_markup.rb b/test/rdoc/test_rdoc_markup.rb index 9f7866fb5a..48683dbcda 100644 --- a/test/rdoc/test_rdoc_markup.rb +++ b/test/rdoc/test_rdoc_markup.rb @@ -18,7 +18,10 @@ the time STR m = RDoc::Markup.new - out = m.convert str, RDoc::Markup::ToTest.new + + tt = RDoc::Markup::ToTest.new m + + out = m.convert str, tt expected = [ "now is the time", @@ -33,5 +36,25 @@ the time assert_equal expected, out end + def test_convert_custom_markup + str = <<-STR +{stricken} + STR + + m = RDoc::Markup.new + m.add_word_pair '{', '}', :STRIKE + + tt = RDoc::Markup::ToTest.new m + tt.add_tag :STRIKE, 'STRIKE ', ' STRIKE' + + out = m.convert str, tt + + expected = [ + "STRIKE stricken STRIKE", + ] + + assert_equal expected, out + end + end |