branch: elpa/pacmacs
commit 75f7ddd459c3136c14a5a7731eddb5d699912205
Author: rexim <[email protected]>
Commit: rexim <[email protected]>

    Add UT for position-of-new-score func (#134)
---
 test/pacmacs-score-test.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/pacmacs-score-test.el b/test/pacmacs-score-test.el
index c08aee3e10..34b9ff5139 100644
--- a/test/pacmacs-score-test.el
+++ b/test/pacmacs-score-test.el
@@ -25,3 +25,11 @@
       (pacmacs--render-score-table input-table)
       (should (equal expected-string
                      (buffer-string))))))
+
+(ert-deftest pacmacs--position-of-new-score-test ()
+  (let ((score-table '(("hello" . 40)
+                       ("world" . 30)
+                       ("foo" . 20)
+                       ("bar" . 10)))
+        (new-score 25))
+    (should (= 2 (pacmacs--position-of-new-score score-table new-score)))))

Reply via email to