branch: elpa/with-simulated-input
commit 3b847dec311564e118081a9148aae32267ffccd4
Author: Ryan C. Thompson <[email protected]>
Commit: Ryan C. Thompson <[email protected]>
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"