test/md2man/roff_test.rb in md2man-1.3.2 vs test/md2man/roff_test.rb in md2man-1.4.0

- old
+ new

@@ -7,11 +7,11 @@ # man 7 groff require 'test_helper' require 'md2man/engine' -describe Md2Man::Roff do +describe 'roff engine' do before do @markdown = Redcarpet::Markdown.new( Md2Man::Engine, :tables => true, :autolink => true, @@ -224,9 +224,33 @@ @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT)) |BINMAN 1 "2011-11-05" "1.1.0" "Ruby User Manuals" |================================================= INPUT |.TH BINMAN 1 "2011\\-11\\-05" "1.1.0" "Ruby User Manuals" + OUTPUT + end + + it 'renders non-first top-level headings as 2nd-level headings' do + @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT)) + |just some h1 heading + |==================== + | + |yet another h1 heading + |====================== + INPUT + |.TH just some h1 heading + |.SH yet another h1 heading + OUTPUT + + @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT)) + |BINMAN 1 "2011-11-05" "1.1.0" "Ruby User Manuals" + |================================================= + | + |DUPMAN 1 "2011-11-05" "1.1.0" "Ruby User Manuals" + |================================================= + INPUT + |.TH BINMAN 1 "2011\\-11\\-05" "1.1.0" "Ruby User Manuals" + |.SH DUPMAN 1 "2011\\-11\\-05" "1.1.0" "Ruby User Manuals" OUTPUT end it 'renders 2nd-level headings' do @markdown.render(heredoc(<<-INPUT)).must_equal(heredoc(<<-OUTPUT))