summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-28 04:19:01 +0900
committergit <svn-admin@ruby-lang.org>2022-11-27 19:46:12 +0000
commit5b1db79129a74156f0c95372bb39f53088a8d596 (patch)
treef2b55942ed6bdb8133fb78dff1dcd2d56abc3d80 /test/rdoc
parent21977b95e238da08ee2dc50fe5a908f11feb130c (diff)
downloadruby-5b1db79129a74156f0c95372bb39f53088a8d596.tar.gz
[ruby/rdoc] Revert "Refactor `RDoc::Markup::Parser#tokenize`"
This reverts commit https://github.com/ruby/rdoc/commit/41ceae93b3bc. https://github.com/ruby/rdoc/commit/5d2c47e8b8
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_markup_parser.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/rdoc/test_rdoc_markup_parser.rb b/test/rdoc/test_rdoc_markup_parser.rb
index 26c4cdc7db..6fccf09612 100644
--- a/test/rdoc/test_rdoc_markup_parser.rb
+++ b/test/rdoc/test_rdoc_markup_parser.rb
@@ -1591,7 +1591,8 @@ Example heading:
[:TEXT, 'Example heading:', 0, 0],
[:NEWLINE, "\n", 16, 0],
[:NEWLINE, "\n", 0, 1],
- [:TEXT, '=== heading three', 3, 2],
+ [:HEADER, 3, 3, 2],
+ [:TEXT, 'heading three', 7, 2],
[:NEWLINE, "\n", 20, 2],
]
@@ -1607,7 +1608,7 @@ Example heading:
expected = [
[:TEXT, 'Verbatim section here that is double-underlined', 2, 0],
[:NEWLINE, "\n", 49, 0],
- [:TEXT, '='*47, 2, 1],
+ [:HEADER, 47, 2, 1],
[:NEWLINE, "\n", 49, 1],
]
@@ -1623,14 +1624,14 @@ Example heading:
STR
expected = [
- [:TEXT, 'A', 2, 0],
- [:NEWLINE, "\n", 3, 0],
- [:TEXT, 'b', 4, 1],
- [:NEWLINE, "\n", 5, 1],
- [:TEXT, '='*47, 2, 2],
- [:NEWLINE, "\n", 49, 2],
- [:TEXT, 'c', 4, 3],
- [:NEWLINE, "\n", 5, 3],
+ [: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)