summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-12 23:59:03 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-12 23:59:03 +0000
commitbcd4deb6c5eb37e0389997ded4ed3e123cdefbc1 (patch)
tree538e5e18663c35fb30ee978f70eec061d963bc4d /test/rdoc
parentb797fdc7e88c5ad7552f1c95081ad3c60507e3ee (diff)
Allow inline markup to have a leading '#' or '\', or trailing punctuation.
i.e. *#freeze?*, *\foo?*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_markup.rb14
-rw-r--r--test/rdoc/test_rdoc_markup_attribute_manager.rb11
2 files changed, 25 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markup.rb b/test/rdoc/test_rdoc_markup.rb
index e0a1df4..d887438 100644
--- a/test/rdoc/test_rdoc_markup.rb
+++ b/test/rdoc/test_rdoc_markup.rb
@@ -334,6 +334,20 @@ class TestRDocMarkup < Test::Unit::TestCase
"L1: ListEnd\n" ])
end
+ def test_list_nested_number_number
+ str = "1. one\n1. two\n 1. cat\n 1. dog"
+
+ line_groups(str,
+ [ "L1: ListStart\n",
+ "L1: NUMBER ListItem\none",
+ "L1: NUMBER ListItem\ntwo",
+ "L2: ListStart\n",
+ "L2: NUMBER ListItem\ncat",
+ "L2: NUMBER ListItem\ndog",
+ "L2: ListEnd\n",
+ "L1: ListEnd\n" ])
+ end
+
def test_list_number
str = "1. one\n2. two\n1. three"
diff --git a/test/rdoc/test_rdoc_markup_attribute_manager.rb b/test/rdoc/test_rdoc_markup_attribute_manager.rb
index 7dcce45..8e66b6b 100644
--- a/test/rdoc/test_rdoc_markup_attribute_manager.rb
+++ b/test/rdoc/test_rdoc_markup_attribute_manager.rb
@@ -82,6 +82,17 @@ class TestRDocMarkupAttributeManager < Test::Unit::TestCase
end
+ def test_bold
+ assert_equal [@bold_on, 'bold', @bold_off],
+ @am.flow("*bold*")
+
+ assert_equal [@bold_on, 'Bold:', @bold_off],
+ @am.flow("*Bold:*")
+
+ assert_equal [@bold_on, '\\bold', @bold_off],
+ @am.flow("*\\bold*")
+ end
+
def test_combined
assert_equal(["cat ", @em_on, "and", @em_off, " ", @bold_on, "dog", @bold_off],
@am.flow("cat _and_ *dog*"))