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

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

[nongnu] elpa/with-simulated-input 582844da4c 085/134: Add a failing tes


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 582844da4c 085/134: Add a failing test for byte-compiled closures
Date: Mon, 10 Jan 2022 23:00:07 -0500 (EST)

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

    Add a failing test for byte-compiled closures
    
    See #6.
---
 tests/test-with-simulated-input.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/test-with-simulated-input.el 
b/tests/test-with-simulated-input.el
index db1c465f5a..a8bbdf8ded 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -11,6 +11,11 @@
 (defvar my-collection)
 (defvar my-non-lexical-var)
 
+(defun call-wsi-from-bytecomp-fun ()
+  (with-simulated-input "hello SPC world RET"
+    (read-string "Say hello: ")))
+(byte-compile 'call-wsi-from-bytecomp-fun)
+
 (describe "`wsi-get-unbound-key'"
   (it "should find an unbound key"
     (let ((unbound-key (wsi-get-unbound-key)))
@@ -75,6 +80,10 @@
           (expect (current-buffer) :to-equal temp-buffer)
           (expect (current-buffer) :not :to-equal orig-current-buffer)))))
 
+  (it "should work in byte-compiled code (issue #6)"
+    (expect (call-wsi-from-bytecomp-fun)
+            :not :to-throw))
+
   (describe "used with `completing-read'"
 
     :var (completing-read-function)



reply via email to

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