mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Display librsvg error when loading bad SVG
* src/image.c (svg_load_image): Display the error message from librsvg when parsing a bad SVG image file. * test/manual/image-tests.el (image-tests-load-image/svg-invalid): New test.
This commit is contained in:
parent
ef17ba8370
commit
816106b7e6
2 changed files with 18 additions and 7 deletions
|
|
@ -78,6 +78,17 @@
|
|||
(image-tests-make-load-image-test 'xbm)
|
||||
(image-tests-make-load-image-test 'xpm)
|
||||
|
||||
(ert-deftest image-tests-load-image/svg-invalid ()
|
||||
(with-temp-buffer
|
||||
(pop-to-buffer (current-buffer))
|
||||
(insert (propertize " "
|
||||
'display '(image :data
|
||||
"invalid foo bar"
|
||||
:type svg)))
|
||||
(redisplay))
|
||||
(with-current-buffer "*Messages*"
|
||||
(should (string-search "XML parse error" (buffer-string)))))
|
||||
|
||||
|
||||
;;;; image-test-size
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue