[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion e24a596631 283/313: Make integration tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion e24a596631 283/313: Make integration tests stabler. |
Date: |
Sat, 3 Dec 2022 10:59:38 -0500 (EST) |
branch: elpa/bash-completion
commit e24a596631635f0307c4c52522a693896e41e3f2
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Make integration tests stabler.
This change helps integration tests ignore any system-wide message that
appear when a shell is started, it:
- waits for specific prompts instead of relying on the prompt regexp
- adds a mark at the end of the bashrc to define the start of the
interesting section, for functions that check buffer content
---
test/bash-completion-integration-test.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/test/bash-completion-integration-test.el
b/test/bash-completion-integration-test.el
index 827cfbad87..1e227d8082 100644
--- a/test/bash-completion-integration-test.el
+++ b/test/bash-completion-integration-test.el
@@ -34,9 +34,11 @@
(require 'ert)
(defvar bash-completion_test-setup-completion "/etc/bash_completion")
+(defconst bash-completion_test-start-mark "====START====")
(defmacro bash-completion_test-harness (bashrc use-separate-process &rest body)
- `(let ((test-env-dir (bash-completion_test-setup-env ,bashrc)))
+ `(let ((test-env-dir (bash-completion_test-setup-env
+ (concat ,bashrc "\necho "
bash-completion_test-start-mark "\n"))))
(let ((bash-completion-processes nil)
(bash-completion-nospace nil)
(bash-completion-start-files nil)
@@ -127,12 +129,17 @@
(defun bash-completion_test-wait-for-prompt (&optional limit)
(bash-completion--wait-for-regexp
- (get-buffer-process shell-buffer) comint-prompt-regexp 3.0 limit))
+ (get-buffer-process shell-buffer) "^.*$ " 3.0 limit))
(defun bash-completion_test-buffer-string (&optional start end)
(delete-trailing-whitespace (point-min) (point-max))
(untabify (point-min) (point-max))
- (buffer-substring-no-properties (or start (point-min)) (or end (point-max))))
+ (buffer-substring-no-properties
+ (or start
+ (save-excursion
+ (goto-char (point-min))
+ (1+ (search-forward bash-completion_test-start-mark end))))
+ (or end (point-max))))
(defun bash-completion_test-candidates (complete-me)
"Complete COMPLETE-ME and returns the candidates."
- [nongnu] elpa/bash-completion 8f33a2aac4 257/313: Better document calling bash-completion from completion-at-point., (continued)
- [nongnu] elpa/bash-completion 8f33a2aac4 257/313: Better document calling bash-completion from completion-at-point., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 96d2cef799 259/313: Prepare for a 3.0 release., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4aafffe76a 260/313: Create CONTRIBUTING.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2b9eba14fa 261/313: Update README.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 79ce50bec9 262/313: Update README.md title, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5e623ac270 275/313: Revert "Add test cases for TRAMP shell.", ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 702859f319 278/313: Cleanup strings containing bash commands., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 19d4fec42f 280/313: Use && instead of ; after cd, so completion fails if cd fails., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c584d4936b 281/313: Explicitly ignore error from the history command., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion de033933bd 282/313: Chain function definitions with && during setup., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e24a596631 283/313: Make integration tests stabler.,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 51c7770758 284/313: Fix and update README.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c6decb1d6c 285/313: Avoid escaping all non-ASCII characters., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4c216c4eea 286/313: Add an integration test to cover multiple completion results., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8f877dc2ce 287/313: Let bash compute COMP_POINT, always at the end of COMP_LINE., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 377969faa7 288/313: Fix typos in README.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 72e9fce93d 291/313: Properly apply filter passed to the dynamic completion function., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 35d38fd3dc 295/313: Workaround for output containing \r\n instead of \n., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 666244383e 296/313: Workaround for command-line being echoed., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abb72c36b8 297/313: Merge branch 'master' of github.com:szermatt/emacs-bash-completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e35943f37e 299/313: Fix backward-compatibility issue on 24.3: avoid using alist-get., ELPA Syncer, 2022/12/03