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

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

[elpa] externals/urgrep 01fbe92f2c 103/115: In tests, wait for grep to f


From: ELPA Syncer
Subject: [elpa] externals/urgrep 01fbe92f2c 103/115: In tests, wait for grep to finish before doing any checks
Date: Wed, 10 May 2023 03:00:49 -0400 (EDT)

branch: externals/urgrep
commit 01fbe92f2cb4f07920fa4b5b2b6b6203f9d44dbb
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    In tests, wait for grep to finish before doing any checks
    
    This ensures that a failing test doesn't prompt about killing the process.
---
 urgrep-tests.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/urgrep-tests.el b/urgrep-tests.el
index 6e4c58f90a..ac7434053a 100644
--- a/urgrep-tests.el
+++ b/urgrep-tests.el
@@ -570,12 +570,12 @@ joined to compare against COMMAND."
 
 (ert-deftest urgrep-tests/urgrep/group ()
   (switch-to-buffer (urgrep "urgrep"))
+  (while (get-buffer-process (current-buffer))
+    (sit-for 0.01))
   (should (and (equal urgrep-current-tool (urgrep-get-tool))
                (local-variable-p 'urgrep-current-tool)))
   (should (and (equal urgrep-current-query '("urgrep"))
                (local-variable-p 'urgrep-current-query)))
-  (while (get-buffer-process (current-buffer))
-    (sit-for 0.01))
   (goto-char (point-min))
   (re-search-forward "urgrep-tests.el")
   (beginning-of-line 2)
@@ -583,24 +583,24 @@ joined to compare against COMMAND."
 
 (ert-deftest urgrep-tests/urgrep/no-group ()
   (switch-to-buffer (urgrep "urgrep" :group nil))
+  (while (get-buffer-process (current-buffer))
+    (sit-for 0.01))
   (should (and (equal urgrep-current-tool (urgrep-get-tool))
                (local-variable-p 'urgrep-current-tool)))
   (should (and (equal urgrep-current-query '("urgrep" :group nil))
                (local-variable-p 'urgrep-current-query)))
-  (while (get-buffer-process (current-buffer))
-    (sit-for 0.01))
   (goto-char (point-min))
   (re-search-forward "urgrep-tests.el:")
   (urgrep-tests/check-match-at-point))
 
 (ert-deftest urgrep-tests/urgrep-run-command ()
   (switch-to-buffer (urgrep-run-command (urgrep-command "urgrep") nil nil))
+  (while (get-buffer-process (current-buffer))
+    (sit-for 0.01))
   (should (and (equal urgrep-current-tool (urgrep-get-tool))
                (local-variable-p 'urgrep-current-tool)))
   (should (and (equal urgrep-current-query (urgrep-command "urgrep"))
                (local-variable-p 'urgrep-current-query)))
-  (while (get-buffer-process (current-buffer))
-    (sit-for 0.01))
   (goto-char (point-min))
   (re-search-forward "urgrep-tests.el")
   (beginning-of-line 2)



reply via email to

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