~pkal/shell-command-plus

75952d83704bd1a3fa483b7eabbefef5ab61acf0 — Philip Kaludercic 1 year, 2 months ago 7121adb
Do not hard-code glob expansions in tests
1 files changed, 4 insertions(+), 11 deletions(-)

M shell-command+-tests.el
M shell-command+-tests.el => shell-command+-tests.el +4 -11
@@ 1,6 1,6 @@
;;; shell-command+-tests.el --- Tests for shell-command+  -*- lexical-binding: t; -*-

;; Copyright (C) 2021, 2022  Free Software Foundation, Inc.
;; Copyright (C) 2021, 2022, 2023  Free Software Foundation, Inc.

;; Author: Philip Kaludercic <philipk@posteo.net>



@@ 166,19 166,12 @@
(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" 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 *.el d" t ("a" ,@(file-expand-wildcards "*.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 b *.el" t ("a" "b" ,@(file-expand-wildcards "*.el")))
                   ("a \"*.el\" d" nil ("a" "*.el" "d"))
                   ("a \"*.el\" d" t ("a" "*.el" "d"))
                   ("a \"b\\ c\" d" nil ("a" "b c" "d"))