summaryrefslogtreecommitdiff
path: root/test/lisp
diff options
context:
space:
mode:
authorJim Porter <jporterbugs@gmail.com>2024-05-09 17:15:14 -0700
committerJim Porter <jporterbugs@gmail.com>2024-05-09 17:15:14 -0700
commit42c0686d6180a7ca1b89f7bde2f9fd17d6a67217 (patch)
tree683d201730100fa60607378cc3ffc9334967ebfd /test/lisp
parente2e8c892ceaf27dcde9049f4a757d8fa853fe54a (diff)
downloademacs-42c0686d6180a7ca1b89f7bde2f9fd17d6a67217.tar.gz
; 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/lisp')
-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'."
`(,(format "%s/some/where/" remote)
(("\\`.*\\.el\\'" . "\\`\\.")) nil)))))
+(ert-deftest em-glob-test/convert/quoted-start-directory ()
+ "Test converting a glob starting in a quoted directory name."
+ (should (equal (eshell-glob-convert
+ (concat (eshell-escape-arg "some where/") "*.el"))
+ '("./some where/" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
+
;; Glob matching