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

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

[nongnu] elpa/with-simulated-input 214ca2c4b1 087/134: Improve test cove


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 214ca2c4b1 087/134: Improve test coverage for current-idle-time advice
Date: Mon, 10 Jan 2022 23:00:07 -0500 (EST)

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

    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)



reply via email to

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