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

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

[nongnu] elpa/pacmacs ee76ee2dc0 299/472: UT for pacmacs--run-away-direc


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs ee76ee2dc0 299/472: UT for pacmacs--run-away-direction (#153)
Date: Thu, 6 Jan 2022 21:59:33 -0500 (EST)

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

    UT for pacmacs--run-away-direction (#153)
---
 test/pacmacs-test.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/pacmacs-test.el b/test/pacmacs-test.el
index 4120384e4f..3852eca864 100644
--- a/test/pacmacs-test.el
+++ b/test/pacmacs-test.el
@@ -54,3 +54,15 @@
     (pacmacs--decrease-terrified-timers)
     (should (equal expected-outcome
                    pacmacs--terrified-ghosts))))
+
+(ert-deftest pacmacs--run-away-direction-test ()
+  (let ((runner '(:row 2 :column 2))
+        (bogey '(:row 2 :column 3))
+        (walls '((1 . 2)
+                 (3 . 2)))
+        (blocked-tile-predicate (-lambda (row column)
+                                  (-find (-partial #'equal (cons row column))
+                                         walls))))
+    (should (equal (pacmacs--run-away-direction runner bogey
+                                                blocked-tile-predicate)
+                   'left))))



reply via email to

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