branch: elpa/pacmacs
commit 9ec0ff9f4de10f1885e1aff8940ed63c9a108632
Author: rexim <[email protected]>
Commit: rexim <[email protected]>

    Add UT for pacmacs--render-score-table
---
 test/pacmacs-score-test.el | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/test/pacmacs-score-test.el b/test/pacmacs-score-test.el
index 8709677946..e22426e26b 100644
--- a/test/pacmacs-score-test.el
+++ b/test/pacmacs-score-test.el
@@ -9,3 +9,19 @@
                           ("bar" . 10))))
     (should (equal expected-table
                    (pacmacs--sort-score-table input-table)))))
+
+(ert-deftest pacmacs--render-score-table-test ()
+  (let ((input-table '(("foo" . 40)
+                       ("hello" . 30)
+                       ("world" . 20)
+                       ("bar" . 10)))
+        (expected-string (concat "Best Scores:\n"
+                                 "------------\n"
+                                 "foo   40\n"
+                                 "hello 30\n"
+                                 "world 20\n"
+                                 "bar   10\n")))
+    (with-temp-buffer
+      (pacmacs--render-score-table input-table)
+      (should (equal expected-string
+                     (buffer-string))))))

Reply via email to