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

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

[nongnu] elpa/bash-completion d9c97b741d 309/313: Attempt to fix automat


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion d9c97b741d 309/313: Attempt to fix automated tests.
Date: Sat, 3 Dec 2022 10:59:40 -0500 (EST)

branch: elpa/bash-completion
commit d9c97b741db389ceb127b0f0180b2087cb24d0ef
Author: Stephane Zermatten <stephane@blossom.lan>
Commit: Stephane Zermatten <stephane@blossom.lan>

    Attempt to fix automated tests.
    
    This change forces inhibit-field-text-motion to nil and changes
    the way bash-completion-integration-prompt-history works to hopefully
    get to a more stable test.
---
 test/bash-completion-integration-test.el | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/test/bash-completion-integration-test.el 
b/test/bash-completion-integration-test.el
index 3b74105d85..5c06b66b29 100644
--- a/test/bash-completion-integration-test.el
+++ b/test/bash-completion-integration-test.el
@@ -56,6 +56,7 @@
                                (concat "explicit-"
                                        (file-name-nondirectory 
bash-completion-prog)
                                        "-args")))
+           (inhibit-field-text-motion nil)
            (old-explicit-args)
            (shell-mode-hook nil)
            (comint-mode-hook nil)
@@ -118,14 +119,18 @@
    (line-beginning-position) (point)))
 
 (defun bash-completion_test-send (command &optional complete)
-  "Execute COMMAND in a shell buffer."
+  "Execute COMMAND in a shell buffer.
+
+Return a marker pointing to the beginning of the command."
   (goto-char (point-max))
-  (let ((command-start (point)))
+  (let ((command-start (point))
+        (insertion-point))
     (delete-region (line-beginning-position) (line-end-position))
-    (insert command)
-    (when complete (completion-at-point))
-    (comint-send-input)
-    (bash-completion_test-wait-for-prompt command-start)))
+    (prog1 (point-marker)
+      (insert command)
+      (when complete (completion-at-point))
+      (comint-send-input)
+      (bash-completion_test-wait-for-prompt command-start))))
 
 (defun bash-completion_test-wait-for-prompt (&optional limit)
   (bash-completion--wait-for-regexp
@@ -555,8 +560,7 @@ other
    (bash-completion_test-send "ls -1 so" 'complete)
    (bash-completion_test-send "tru" 'complete)
    (bash-completion_test-send "fals" 'complete)
-   (let ((history-start (line-beginning-position)))
-     (bash-completion_test-send "history")
+   (let ((history-start (bash-completion_test-send "history")))
      (untabify (point-min) (point-max))
      (delete-trailing-whitespace (point-min) (point-max))
      (should (equal



reply via email to

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