diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-31 00:19:00 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-31 00:19:00 +0000 |
commit | 89b601d176a64f1293a3d3b5195b6735cbf880af (patch) | |
tree | c7f148e8cf8576202220ce567dc8b9a698e4b114 /test/rdoc/test_rdoc_markup_parser.rb | |
parent | 4ac69a57b5e8587a321b052212ae5b9bedeafe55 (diff) |
* lib/rdoc: Update to RDoc 3.9. Fixed `ri []`, stopdoc creating an
object reference, nodoc for class aliases, verbatim === lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_parser.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_parser.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markup_parser.rb b/test/rdoc/test_rdoc_markup_parser.rb index 98c16a18ef..a9d2a1b4fb 100644 --- a/test/rdoc/test_rdoc_markup_parser.rb +++ b/test/rdoc/test_rdoc_markup_parser.rb @@ -1366,6 +1366,44 @@ Example heading: assert_equal expected, @RMP.tokenize(str) end + def test_tokenize_verbatim_rule + str = <<-STR + Verbatim section here that is double-underlined + =============================================== + STR + + expected = [ + [:TEXT, 'Verbatim section here that is double-underlined', 2, 0], + [:NEWLINE, "\n", 49, 0], + [:HEADER, 47, 2, 1], + [:NEWLINE, "\n", 49, 1], + ] + + assert_equal expected, @RMP.tokenize(str) + end + + def test_tokenize_verbatim_rule_fancy + str = <<-STR + A + b + =============================================== + c + STR + + expected = [ + [:TEXT, 'A', 2, 0], + [:NEWLINE, "\n", 3, 0], + [:TEXT, 'b', 4, 1], + [:NEWLINE, "\n", 5, 1], + [:HEADER, 47, 2, 2], + [:NEWLINE, "\n", 49, 2], + [:TEXT, 'c', 4, 3], + [:NEWLINE, "\n", 5, 3], + ] + + assert_equal expected, @RMP.tokenize(str) + end + # HACK move to Verbatim test case def test_verbatim_normalize v = @RM::Verbatim.new "foo\n", "\n", "\n", "bar\n" |