diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-08-05 23:59:31 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-08-06 02:35:56 -0600 |
| commit | c5b82196532db9111286130c9ebfdabfbdead558 (patch) | |
| tree | 0c00a53dc16097a068d305ada0541a44cf1ffe42 /spec/admonition_spec.rb | |
| parent | 80c0d04976421849ee22236407933eb757df5634 (diff) | |
verify warning is emitted when raster icon for admonition block cannot be embedded
Diffstat (limited to 'spec/admonition_spec.rb')
| -rw-r--r-- | spec/admonition_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/admonition_spec.rb b/spec/admonition_spec.rb index e99cdf44..d44d97a3 100644 --- a/spec/admonition_spec.rb +++ b/spec/admonition_spec.rb @@ -460,6 +460,20 @@ describe 'Asciidoctor::PDF::Converter - Admonition' do end).to log_message severity: :WARN, message: %(~could not embed admonition icon: #{fixture_file 'broken.svg'}; Missing end tag for 'rect') end + it 'should warn if raster icon specified by icon attribute cannot be embedded' do + (expect do + pdf = to_pdf <<~'EOS', attribute_overrides: { 'iconsdir' => fixtures_dir }, analyze: :image + :icons: + + [TIP,icon=corrupt.png] + ==== + Use the icon attribute to customize the image for an admonition block. + ==== + EOS + (expect pdf.images).to be_empty + end).to log_message severity: :WARN, message: %(~could not embed admonition icon: #{fixture_file 'corrupt.png'}; image file is an unrecognised format) + end + it 'should embed remote image in icon if allow-uri-read attribute is set', visual: true do to_file = to_pdf_file <<~'EOS', 'admonition-custom-svg-icon-with-remote-image.pdf', attribute_overrides: { 'docdir' => fixtures_dir, 'allow-uri-read' => '' } :icons: font |
