diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-20 11:18:31 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-20 11:18:31 +0200 |
commit | bd0b96d25295c1d29186d4a96a2215ab0239c64c (patch) | |
tree | a324fb32828c124d9fef2587ac50c672ed44203a /test/manual/image-circular-tests.el | |
parent | 1172c7303dbce015d12424739a56bfce00e195b1 (diff) | |
download | emacs-bd0b96d25295c1d29186d4a96a2215ab0239c64c.tar.gz emacs-bd0b96d25295c1d29186d4a96a2215ab0239c64c.tar.bz2 emacs-bd0b96d25295c1d29186d4a96a2215ab0239c64c.zip |
Allow using :width/:height as normal with xbm images
* doc/lispref/display.texi (XBM Images): Adjust the documentation.
* src/image.c (enum xbm_keyword_index): Add :data-width and
:data-height.
(xbm_format): Ditto.
(xbm_image_p): Allow passing in :width/:height for display.
(xbm_load): Use :data-width/:data-height.
Diffstat (limited to 'test/manual/image-circular-tests.el')
-rw-r--r-- | test/manual/image-circular-tests.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/test/manual/image-circular-tests.el b/test/manual/image-circular-tests.el index edc65eee9b8..1299970f827 100644 --- a/test/manual/image-circular-tests.el +++ b/test/manual/image-circular-tests.el @@ -29,22 +29,25 @@ (ert-deftest image-test-duplicate-keywords () "Test that duplicate keywords in an image spec lead to rejection." - (should-error (image-size `(image :type xbm :type xbm :width 1 :height 1 + (should-error (image-size `(image :type xbm :type xbm + :data-width 1 :data-height 1 :data ,(bool-vector t)) t))) (ert-deftest image-test-circular-plist () "Test that a circular image spec is rejected." (should-error - (let ((l `(image :type xbm :width 1 :height 1 :data ,(bool-vector t)))) + (let ((l `(image :type xbm :data-width 1 :data-height 1 + :data ,(bool-vector t)))) (setcdr (last l) '#1=(:invalid . #1#)) (image-size l t)))) (ert-deftest image-test-:type-property-value () "Test that :type is allowed as a property value in an image spec." - (should (equal (image-size `(image :dummy :type :type xbm :width 1 :height 1 - :data ,(bool-vector t)) - t) + (should (equal (image-size `(image :dummy :type :type xbm + :data-width 1 :data-height 1 + :data ,(bool-vector t)) + t) (cons 1 1)))) (ert-deftest image-test-circular-specs () @@ -52,9 +55,9 @@ (should (let* ((circ1 (cons :dummy nil)) (circ2 (cons :dummy nil)) - (spec1 `(image :type xbm :width 1 :height 1 + (spec1 `(image :type xbm :data-width 1 :data-height 1 :data ,(bool-vector 1) :ignored ,circ1)) - (spec2 `(image :type xbm :width 1 :height 1 + (spec2 `(image :type xbm :data-width 1 :data-height 1 :data ,(bool-vector 1) :ignored ,circ2))) (setcdr circ1 circ1) (setcdr circ2 circ2) |