Skip to content

Commit

Permalink
verify imagesdir is respected if changed mid-document
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Sep 9, 2019
1 parent b08e202 commit 8823c8d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@
}).to log_message severity: :WARN, message: '~image to embed not found or not readable'
end

it 'should respect value of imagesdir if changed mid-document' do
pdf = to_pdf <<~EOS, attributes: { 'nofooter' => '' }
:imagesdir: #{fixtures_dir}
image::tux.png[tux]
:imagesdir: #{examples_dir}
image::wolpertinger.jpg[wolpertinger]
EOS

(expect get_images pdf).to have_size 2
end

it 'should warn instead of crash if inline image is unreadable' do
image_file = fixture_file 'logo.png'
old_mode = (File.stat image_file).mode
Expand Down

0 comments on commit 8823c8d

Please sign in to comment.