[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-command+ 86caf3d 09/13: Add tests for shell-comma
From: |
Stefan Monnier |
Subject: |
[elpa] externals/shell-command+ 86caf3d 09/13: Add tests for shell-command+-tokenize |
Date: |
Sun, 23 May 2021 13:41:27 -0400 (EDT) |
branch: externals/shell-command+
commit 86caf3dc34c977a1feec7f82770a2de00e33c0ee
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@posteo.net>
Add tests for shell-command+-tokenize
---
shell-command+-tests.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/shell-command+-tests.el b/shell-command+-tests.el
index e4c54e2..b68169d 100644
--- a/shell-command+-tests.el
+++ b/shell-command+-tests.el
@@ -154,5 +154,26 @@
(should (string= (shell-command+-expand-path path)
expand)))))
+(ert-deftest sc+-tokenize ()
+ "Test that `shell-command+-tokenize' works as expected"
+ (pcase-dolist (`(,args ,expand ,list)
+ '(("a b c" nil ("a" "b" "c"))
+ ("a \"b c\" d" nil ("a" "b c" "d"))
+ ("a *.el d" nil ("a" "*.el" "d"))
+ ("a *.el d" t ("a"
+ ".dir-locals.el"
+ "shell-command+-tests.el"
+ "shell-command+.el"
+ "d"))
+ ("a b *.el" nil ("a" "b" "*.el"))
+ ("a b *.el" t ("a" "b"
+ ".dir-locals.el"
+ "shell-command+-tests.el"
+ "shell-command+.el"))
+ ("a \"*.el\" d" nil ("a" "*.el" "d"))
+ ("a \"*.el\" d" t ("a" "*.el" "d"))))
+ (should (equal (shell-command+-tokenize args expand)
+ list))))
+
(provide 'shell-command+-tests)
;;; shell-command+-tests.el ends here
- [elpa] externals/shell-command+ 7d39cf5 01/13: Simplify shell-command+--command-regexp, (continued)
- [elpa] externals/shell-command+ 7d39cf5 01/13: Simplify shell-command+--command-regexp, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ c190d6c 02/13: Add shell-command+-flip-redirection option, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ 1b29abe 03/13: Remove hard dependency on eshell, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ ca82436 12/13: Update documentation to reflect eshell deprecation, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ a891756 04/13: Detect errors during tokenization, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ f65aca2 13/13: Bump version to 2.2.0, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ d0004fa 05/13: Add EXPAND parameter to shell-command+-tokenize, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ 13980c6 11/13: Fix copyright header in shell-command+-tests.el, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ e76acf5 10/13: Remove test code from main file, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ 9aaa4cb 07/13: Accept only one argument in locate, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ 86caf3d 09/13: Add tests for shell-command+-tokenize,
Stefan Monnier <=
- [elpa] externals/shell-command+ 9b1d98e 06/13: Fix shell-command+-cmd-grep invocation, Stefan Monnier, 2021/05/23
- [elpa] externals/shell-command+ 6c7a95b 08/13: Fix quoted shell expansion, Stefan Monnier, 2021/05/23