summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_markup.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-16 04:59:24 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-16 04:59:24 +0000
commitb7528b5edb1f9148ea00ebb6151720e5943b3f0b (patch)
tree4caf55c53adb188170240f54b924892fbc5f9814 /test/rdoc/test_rdoc_markup.rb
parent97ac172d58d695305c39d555155318edb99f1ea7 (diff)
* lib/rdoc.rb: Import RDoc 3.7 release candidate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup.rb')
-rw-r--r--test/rdoc/test_rdoc_markup.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_markup.rb b/test/rdoc/test_rdoc_markup.rb
index 9f7866fb5aa..48683dbcda8 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