Skip to content

Commit 6c6f0bf

Browse files
committed
Add extra test for rules
1 parent 5fb832a commit 6c6f0bf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/test_rdoc_markup_parser.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,25 @@ def test_parse_paragraph_verbatim
625625
assert_equal expected, @RMP.parse(str).parts
626626
end
627627

628+
def test_parse_rule
629+
str = <<-STR
630+
now is the time
631+
632+
---
633+
634+
for all good men
635+
STR
636+
637+
expected = [
638+
@RM::Paragraph.new('now is the time'),
639+
@RM::BlankLine.new,
640+
@RM::Rule.new(1),
641+
@RM::BlankLine.new,
642+
@RM::Paragraph.new('for all good men')]
643+
644+
assert_equal expected, @RMP.parse(str).parts
645+
end
646+
628647
def test_parse_ualpha
629648
str = <<-STR
630649
A. l1

0 commit comments

Comments
 (0)