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

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

[nongnu] elpa/with-simulated-input dca9d87d50 091/134: Move issue-specif


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input dca9d87d50 091/134: Move issue-specific tests to their own block
Date: Mon, 10 Jan 2022 23:00:08 -0500 (EST)

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

    Move issue-specific tests to their own block
---
 tests/test-with-simulated-input.el | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/tests/test-with-simulated-input.el 
b/tests/test-with-simulated-input.el
index 2a85a62db0..9be5503a16 100644
--- a/tests/test-with-simulated-input.el
+++ b/tests/test-with-simulated-input.el
@@ -203,19 +203,6 @@
              (read-string "Second word: ")))
      :to-equal '("hello" "world")))
 
-  ;; https://github.com/DarwinAwardWinner/with-simulated-input/issues/4
-  (it "should work inside code that switches buffers (issue #4)"
-    (let ((orig-current-buffer (current-buffer)))
-      (with-temp-buffer
-        (let ((temp-buffer (current-buffer)))
-          (with-simulated-input "a" (read-char))
-          (expect (current-buffer) :to-equal temp-buffer)
-          (expect (current-buffer) :not :to-equal orig-current-buffer)))))
-
-  (xit "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)
@@ -245,7 +232,21 @@
 
        (with-simulated-input "bl TAB C-j"
          (completing-read "Choose: " my-collection nil t))
-       :to-throw))))
+       :to-throw)))
+
+  (describe "should not reproduce past issues:"
+    ;; https://github.com/DarwinAwardWinner/with-simulated-input/issues/4
+    (it "Issue #4: simulating input should not switch buffers"
+      (let ((orig-current-buffer (current-buffer)))
+        (with-temp-buffer
+          (let ((temp-buffer (current-buffer)))
+            (with-simulated-input "a" (read-char))
+            (expect (current-buffer) :to-equal temp-buffer)
+            (expect (current-buffer) :not :to-equal orig-current-buffer)))))
+
+    (xit "Issue #6: `with-simulated-input' should work in byte-compiled code"
+      (expect (call-wsi-from-bytecomp-fun)
+              :not :to-throw))))
 
 (defun time-equal-p (t1 t2)
   "Return non-nil if T1 and T2 represent the same time.



reply via email to

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