Skip to content

Commit

Permalink
account for new error message logged by Asciidoctor > 2.0.22 when tab…
Browse files Browse the repository at this point in the history
…le row is incomplete
  • Loading branch information
mojavelinux committed May 17, 2024
1 parent 9b5bce9 commit d52b5ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
end

it 'should not crash if cols and table cells are mismatched' do
expected_messages = [severity: :WARN, message: 'no rows found in table']
if (Gem::Version.new Asciidoctor::VERSION) > (Gem::Version.new '2.0.22')
expected_messages.unshift severity: :ERROR, message: 'dropping cells from incomplete row detected end of table'
end
(expect do
pdf = to_pdf <<~'EOS', analyze: :line
[cols="1,"]
Expand All @@ -24,7 +28,7 @@
EOS

(expect pdf.lines).to have_size 8
end).to not_raise_exception & (log_message severity: :WARN, message: 'no rows found in table')
end).to not_raise_exception & (log_messages expected_messages)
end

it 'should not crash when rows have cells with colspans of varying length' do
Expand Down

0 comments on commit d52b5ae

Please sign in to comment.