aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJim Porter2024-05-09 17:15:14 -0700
committerJim Porter2024-05-09 17:15:14 -0700
commit42c0686d6180a7ca1b89f7bde2f9fd17d6a67217 (patch)
tree683d201730100fa60607378cc3ffc9334967ebfd /test
parente2e8c892ceaf27dcde9049f4a757d8fa853fe54a (diff)
downloademacs-42c0686d6180a7ca1b89f7bde2f9fd17d6a67217.tar.gz
emacs-42c0686d6180a7ca1b89f7bde2f9fd17d6a67217.zip
; Fix an edge case with Eshell globs when the directory part is quoted
* lisp/eshell/esh-util.el (eshell-split-filename): Escaping shouldn't matter for splitting the name (no other shells handle it like this). * test/lisp/eshell/em-glob-tests.el (em-glob-test/convert/quoted-start-directory): New test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/eshell/em-glob-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/eshell/em-glob-tests.el b/test/lisp/eshell/em-glob-tests.el
index 40cdfd1a676..d7d8f59eda0 100644
--- a/test/lisp/eshell/em-glob-tests.el
+++ b/test/lisp/eshell/em-glob-tests.el
@@ -146,6 +146,12 @@ value of `eshell-glob-splice-results'."
146 `(,(format "%s/some/where/" remote) 146 `(,(format "%s/some/where/" remote)
147 (("\\`.*\\.el\\'" . "\\`\\.")) nil))))) 147 (("\\`.*\\.el\\'" . "\\`\\.")) nil)))))
148 148
149(ert-deftest em-glob-test/convert/quoted-start-directory ()
150 "Test converting a glob starting in a quoted directory name."
151 (should (equal (eshell-glob-convert
152 (concat (eshell-escape-arg "some where/") "*.el"))
153 '("./some where/" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
154
149 155
150;; Glob matching 156;; Glob matching
151 157