diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-03-11 17:56:55 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-03-11 17:56:55 -0700 |
| commit | cd098fd1f3915ebee2d6ba2ebb2f2c77b4edd893 (patch) | |
| tree | ab19497cd68e620c15e2929e8ba93fc1f091f2a2 /spec/image_spec.rb | |
| parent | a5cebf22f34099a588ba0db882cb545bafac7224 (diff) | |
add test to verify image can be read from path with non-ASCII characters
Diffstat (limited to 'spec/image_spec.rb')
| -rw-r--r-- | spec/image_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/image_spec.rb b/spec/image_spec.rb index 73acd5bf..71116ee4 100644 --- a/spec/image_spec.rb +++ b/spec/image_spec.rb @@ -136,6 +136,14 @@ describe 'Asciidoctor::PDF::Converter - Image' do (expect to_file).to visually_match 'image-wolpertinger.pdf' end + it 'should resolve target of block image in directory with non-ASCII characters', visual: true do + pdf = to_pdf <<~'END', analyze: :image, attribute_overrides: { 'imagesdir' => (File.join fixtures_dir, '测试') } + image::square.png[pdfwidth=1in] + END + + (expect pdf.images).to have_size 1 + end + it 'should replace block image with alt text if image is missing' do (expect do pdf = to_pdf 'image::no-such-image.png[Missing Image]', analyze: true |
