[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion e4dca63c32: Test support for default compl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion e4dca63c32: Test support for default completion (complete -D) |
Date: |
Sat, 4 Feb 2023 07:58:17 -0500 (EST) |
branch: elpa/bash-completion
commit e4dca63c329df6bd48dc299a5044d81d56530c84
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Test support for default completion (complete -D)
This change adds an integration test to cover support for default
completion, recently fixed in commit 9450103.
---
test/bash-completion-integration-test.el | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/test/bash-completion-integration-test.el
b/test/bash-completion-integration-test.el
index cb5671ed0b..62b7ffac86 100644
--- a/test/bash-completion-integration-test.el
+++ b/test/bash-completion-integration-test.el
@@ -442,6 +442,37 @@ across Emacs version."
(should (equal "dummy 1 Yaaa "
(bash-completion_test-complete "dummy 1 Y")))))
+(ert-deftest bash-completion-integration-default ()
+ (bash-completion_test-with-shell-harness
+ (concat ; .bashrc
+ "function _ook {\n"
+ " COMPREPLY=(ook)\n"
+ "}\n"
+ "function _bar {\n"
+ " COMPREPLY=(bar)\n"
+ "}\n"
+ "function _baa {\n"
+ " COMPREPLY=(baa)\n"
+ "}\n"
+ "complete -F _ook -D\n"
+ "complete -F _bar foo\n"
+ "complete -F _baa baa\n")
+ t ; use-separate-process
+ ;; using default (_ook)
+ (should (equal
+ "faa ook "
+ (bash-completion_test-complete "faa a")))
+ (should (equal
+ "fee ook "
+ (bash-completion_test-complete "fee a")))
+ ;; exceptions, to make sure non-default still works
+ (should (equal
+ "foo bar "
+ (bash-completion_test-complete "foo a")))
+ (should (equal
+ "baa baa "
+ (bash-completion_test-complete "baa a")))))
+
(ert-deftest bash-completion-integration-case-insensitive-test ()
(bash-completion_test-harness
(concat ; .bashrc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/bash-completion e4dca63c32: Test support for default completion (complete -D),
ELPA Syncer <=