diff options
author | Holger Dürer <me@hdurer.net> | 2017-05-16 21:09:58 +0100 |
---|---|---|
committer | Johnson Denen <johnson.denen@gmail.com> | 2017-05-18 10:21:21 -0400 |
commit | fe8e4386eacb358df0e16dc5bd37dde4f4d6d57c (patch) | |
tree | 2329c867ca4d8434e6e2200aae4f827e7f2a9165 /test/mastodon-media-tests.el | |
parent | 5f41086d3a03e8781aab77ab17f4d4f95263e07c (diff) |
Remove most byte-compile warnings.
We do this by
- moving vars into the files where they are (mostly) used
- "declaring" vars used elsewhere with the (defvar <var-name>) pattern,
- declaring functions defined in others functions rather than loading the file via require.
Diffstat (limited to 'test/mastodon-media-tests.el')
-rw-r--r-- | test/mastodon-media-tests.el | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/mastodon-media-tests.el b/test/mastodon-media-tests.el index 9cd06b7..4bb89c7 100644 --- a/test/mastodon-media-tests.el +++ b/test/mastodon-media-tests.el @@ -6,7 +6,7 @@ (mock (image-type-available-p 'imagemagick) => t) (mock (create-image * 'imagemagick t :height 123) => :mock-image) - (let* ((mastodon-avatar-height 123) + (let* ((mastodon-media--avatar-height 123) (result (mastodon-media--get-avatar-rendering "http://example.org/img.png")) (result-no-properties (substring-no-properties result)) (properties (text-properties-at 0 result))) @@ -21,7 +21,7 @@ (with-mock (mock (create-image * nil t) => :mock-image) - (let* ((mastodon-preview-max-height 123) + (let* ((mastodon-media--preview-max-height 123) (result (mastodon-media--get-media-link-rendering "http://example.org/img.png")) (result-no-properties (substring-no-properties result)) (properties (text-properties-at 0 result))) @@ -34,7 +34,7 @@ (ert-deftest mastodon-media:load-image-from-url:avatar-with-imagemagic () "Should make the right call to url-retrieve." (let ((url "http://example.org/image.png") - (mastodon-avatar-height 123)) + (mastodon-media--avatar-height 123)) (with-mock (mock (image-type-available-p 'imagemagick) => t) (mock (create-image * 'imagemagick t :height 123) => '(image foo)) @@ -42,7 +42,7 @@ (mock (url-retrieve url #'mastodon-media--process-image-response - '(:my-marker (:height 123) 1 "http://example.org/image.png")) + '(:my-marker (:height 123) 1)) => :called-as-expected) (with-temp-buffer @@ -62,7 +62,7 @@ (mock (url-retrieve url #'mastodon-media--process-image-response - '(:my-marker () 1 "http://example.org/image.png")) + '(:my-marker () 1)) => :called-as-expected) (with-temp-buffer @@ -82,13 +82,13 @@ (mock (url-retrieve "http://example.org/image.png" #'mastodon-media--process-image-response - '(:my-marker (:max-height 321) 5 "http://example.org/image.png")) + '(:my-marker (:max-height 321) 5)) => :called-as-expected) (with-temp-buffer (insert (concat "Start:" (mastodon-media--get-media-link-rendering url) ":rest")) - (let ((mastodon-preview-max-height 321)) + (let ((mastodon-media--preview-max-height 321)) (should (eq :called-as-expected (mastodon-media--load-image-from-url url 'media-link 7 5)))))))) (ert-deftest mastodon-media:load-image-from-url:media-link-without-imagemagic () @@ -101,14 +101,14 @@ (mock (url-retrieve "http://example.org/image.png" #'mastodon-media--process-image-response - '(:my-marker () 5 "http://example.org/image.png")) + '(:my-marker () 5)) => :called-as-expected) (with-temp-buffer (insert (concat "Start:" (mastodon-media--get-avatar-rendering url) ":rest")) - (let ((mastodon-preview-max-height 321)) + (let ((mastodon-media--preview-max-height 321)) (should (eq :called-as-expected (mastodon-media--load-image-from-url url 'media-link 7 5)))))))) (ert-deftest mastodon-media:process-image-response () @@ -134,7 +134,7 @@ (mock (create-image "fake\nimage\ndata" 'imagemagick t ':image :option) => :fake-image) - (mastodon-media--process-image-response () used-marker '(:image :option) 1 "the-url") + (mastodon-media--process-image-response () used-marker '(:image :option) 1) ;; the used marker has been unset: (should (null (marker-position used-marker))) |