[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 6a0ada6278 038/313: completed test cases
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 6a0ada6278 038/313: completed test cases |
Date: |
Sat, 3 Dec 2022 10:59:13 -0500 (EST) |
branch: elpa/bash-completion
commit 6a0ada627810c3ebacc362ff690653a1d34eb2db
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
completed test cases
---
bash-completion.el | 1 -
bash-completion_test.el | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/bash-completion.el b/bash-completion.el
index d32a74c1a4..379057e45a 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -95,7 +95,6 @@ Call bash to do the completion."
"'")))
(defun bash-completion-escape (word)
- (message "escape: %s" word)
(if (string-match "^['\"]" word)
word
(replace-regexp-in-string "\\([ '\"]\\)" "\\\\\\1" word)))
diff --git a/bash-completion_test.el b/bash-completion_test.el
index 93acddee21..09cb8bada8 100644
--- a/bash-completion_test.el
+++ b/bash-completion_test.el
@@ -400,6 +400,49 @@ garbage
(bash-completion-fix " world" "hello")
"hello\\ world")
+ ("bash-completion-extract"
+ (flet ((bash-completion-buffer () (current-buffer)))
+ (sz-testutils-with-buffer
+ "hello world\nhello \n\n"
+ (bash-completion-extract "hello")))
+ '("hello\\ world" "hello "))
+
+ ("bash-completion-nonsep"
+ (list
+ (bash-completion-nonsep nil)
+ (bash-completion-nonsep ?')
+ (bash-completion-nonsep ?\"))
+ '("^ \t\n\r'\"" "^ \t\n\r'" "^ \t\n\r\""))
+
+
+ ("bash-completion-escape"
+ (bash-completion-escape "He said: \"hello, 'you'\"")
+ "He\\ said:\\ \\\"hello,\\ \\'you\\'\\\"")
+
+ ("bash-completion-escape not if double quoted"
+ (bash-completion-escape "\"hello, you")
+ "\"hello, you")
+
+ ("bash-completion-escape not if single quoted"
+ (bash-completion-escape "'hello, you")
+ "'hello, you")
+
+ ("bash-completion-quote allowed"
+ (bash-completion-quote "abc_ABC/1-2.3")
+ "abc_ABC/1-2.3")
+
+ ("bash-completion-quote quoted"
+ (bash-completion-quote "a$b")
+ "'a$b'")
+
+ ("bash-completion-quote quoted single quote"
+ (bash-completion-quote "a'b")
+ "'a'\\''b'")
+
+ ("bash-completion-join"
+ (bash-completion-join '("ls" "-l" "/a/b" "/a/b c" "/a/b'c" "$help/d"))
+ "ls -l /a/b '/a/b c' '/a/b'\\''c' '$help/d'")
+
))
;; ---------- integration tests
- [nongnu] elpa/bash-completion 8c3995aa98 187/313: run_tests.sh displays the bash command to test against., (continued)
- [nongnu] elpa/bash-completion 8c3995aa98 187/313: run_tests.sh displays the bash command to test against., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 3eba6922e6 190/313: Use executable-find instead of hardcoding /bin/bash., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1d41c58bd5 192/313: Send initialization command as one string, as long as possible., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c5d4f92e6d 195/313: Still EMACS_BASH_COMPLETE using setenv for local processes., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 24088ede85 196/313: Explicitly mention compatibility with Bash 3 and 4., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0f6466eeb4 197/313: Tell minibuffer not to delay after displaying a message while, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0c4557a5ed 193/313: Integration test for default completion (-D)., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e7869dd68d 200/313: Fix a bug when no process is associated with the current buffer, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 80be2f37a9 205/313: Check the buffer uses comint-mode before using the same process, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 28ec870dd1 019/313: only one -complete method, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6a0ada6278 038/313: completed test cases,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 7d6236e6e7 100/313: ignore .elc files, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1aff6d8806 084/313: comment about shell-command, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f5384c6176 051/313: A little refactoring, test case for wordbreak completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6f7c2b8b4f 080/313: removed initial version, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a2cf41d7fc 102/313: put in accidentally removed blank line from README, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a8b652d00a 058/313: commented all functions, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b4fe25b51c 060/313: update tests for latest refactorings, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 49ae0ada64 076/313: keep open quote, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion aedcc114dc 105/313: Minor fixes to eliminate byte-compiler warnings., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8c771b10d1 082/313: fix typo, ELPA Syncer, 2022/12/03