diff options
Diffstat (limited to 'test/lisp')
| -rw-r--r-- | test/lisp/filenotify-tests.el | 5 | ||||
| -rw-r--r-- | test/lisp/files-tests.el | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index f2feef6132b..219fa746119 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -57,9 +57,10 @@ 'tramp-default-host-alist `("\\`mock\\'" nil ,(system-name))) ;; Emacs' Makefile sets $HOME to a nonexistent value. Needed in - ;; batch mode only, therefore. + ;; batch mode only, therefore. `temporary-file-directory' might + ;; be quoted, so we unquote it just in case. (unless (and (null noninteractive) (file-directory-p "~/")) - (setenv "HOME" temporary-file-directory)) + (setenv "HOME" (file-name-unquote temporary-file-directory))) (format "/mock::%s" temporary-file-directory))) "Temporary directory for Tramp tests.") diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 6b394cd5b7b..90e5ebf2153 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -268,7 +268,14 @@ be $HOME." (should (file-name-quoted-p (file-name-quote temporary-file-directory))) (should (equal temporary-file-directory (file-name-unquote - (file-name-quote temporary-file-directory)))))) + (file-name-quote temporary-file-directory)))) + ;; It does not hurt to quote/unquote a file several times. + (should (equal (file-name-quote temporary-file-directory) + (file-name-quote + (file-name-quote temporary-file-directory)))) + (should (equal (file-name-unquote temporary-file-directory) + (file-name-unquote + (file-name-unquote temporary-file-directory)))))) (ert-deftest files-tests--file-name-non-special--subprocess () "Check that Bug#25949 is fixed." |
