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

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

[nongnu] elpa/with-simulated-input 3b847dec31 037/134: Add tests for wsi


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 3b847dec31 037/134: Add tests for wsi-get-unbound-key
Date: Mon, 10 Jan 2022 23:00:02 -0500 (EST)

branch: elpa/with-simulated-input
commit 3b847dec311564e118081a9148aae32267ffccd4
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>

    Add tests for wsi-get-unbound-key
---
 tests/test-with-simulated-input.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/test-with-simulated-input.el 
b/tests/test-with-simulated-input.el
index bb597315a2..aee72e2641 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -12,6 +12,17 @@
 (defvar mycollection)
 (defvar my-non-lexical-var)
 
+(describe "`wsi-get-unbound-key'"
+  (it "should find an unbound key"
+    (let ((unbound-key (wsi-get-unbound-key)))
+      (expect unbound-key :to-be-truthy)
+      (expect (wsi-key-bound-p unbound-key) :not :to-be-truthy)))
+  (it "should report an error if it fails to find an unbound key"
+    ;; Now we call it with an empty list of modifiers and keys to
+    ;; search, so it definitely should not find a binding.
+    (expect (wsi-get-unbound-key '() "")
+            :to-throw 'error)))
+
 (describe "`with-simulated-input'"
 
   (it "should work for basic string input"



reply via email to

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