branch: elpa/with-simulated-input
commit 214ca2c4b1057880b181570d52dbb9775e1c9f6e
Author: Ryan C. Thompson <[email protected]>
Commit: Ryan C. Thompson <[email protected]>
Improve test coverage for current-idle-time advice
---
tests/test-with-simulated-input.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test-with-simulated-input.el
b/tests/test-with-simulated-input.el
index 0cc0c469c5..47042a76dc 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -136,7 +136,6 @@
(it "should allow lisp forms to throw errors"
(expect
-
(with-simulated-input '("hello SPC" (error "Throwing an error") "RET")
(read-string "Enter a string: "))
:to-throw))
@@ -254,6 +253,10 @@ Note that there are multiple ways to represent a time, so
(expect canary-idle-time :to-be-truthy)
(expect (time-equal-p canary-idle-time (seconds-to-time 1))))
+ (it "should not interfere with the normal operation of `current-idle-time'"
+ ;; Outside WSI, this will just return the normal value
+ (expect (current-idle-time) :not :to-throw))
+
(it "should actually wait the specified time when `actually-wait' is non-nil"
(spy-on 'sleep-for :and-call-through)
(run-with-idle-timer 0.01 nil 'idle-canary)