emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pacmacs b19ed92514 389/472: Add UT for color-hex-gradient


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs b19ed92514 389/472: Add UT for color-hex-gradient
Date: Thu, 6 Jan 2022 21:59:42 -0500 (EST)

branch: elpa/pacmacs
commit b19ed925141a26578abba4bd4720c2ceed3aece5
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    Add UT for color-hex-gradient
---
 test/pacmacs-image-test.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/pacmacs-image-test.el b/test/pacmacs-image-test.el
index 19425bf94c..c05230ce1f 100644
--- a/test/pacmacs-image-test.el
+++ b/test/pacmacs-image-test.el
@@ -100,3 +100,12 @@
   (should (equal '(t t t t nil nil nil nil)
                  (pacmacs--normalize-wall-bits
                   '(t t t t t t t t)))))
+
+(ert-deftest pacmacs--color-hex-gradient ()
+  (with-mock
+   (mock (color-name-to-rgb *) => 'rgb :times 2)
+   (mock (color-gradient 'rgb 'rgb 5) => '((rgb) (rgb) (rgb) (rgb) (rgb)))
+   (mock (color-rgb-to-hex 'rgb) => 'hex :times 5)
+
+   (should (equal '(hex hex hex hex hex)
+                  (pacmacs--color-hex-gradient 'khooy 'khooy 5)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]