From 003d012adc7671f9f0ad42cf9aca5f147a8d0c0c Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sat, 13 Nov 2021 17:38:36 -0800 Subject: [PATCH 1/2] ; Add another 'abbreviate-file-name' test * test/lisp/files-tests.el (files-tests-abbreviate-file-name-non-special): New test. --- test/lisp/files-tests.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index d00f1ce326..df57d78fca 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1364,6 +1364,15 @@ files-tests-abbreviate-file-name-directory-abbrev-alist (abbreviate-file-name (concat homedir "nowhere/special/here")))))) +(ert-deftest files-tests-abbreviate-file-name-non-special () + (let* ((homedir temporary-file-directory) + (process-environment (cons (format "HOME=%s" homedir) + process-environment)) + (abbreviated-home-dir nil)) + ;; Check that abbreviation doesn't occur for quoted file names. + (should (equal (concat "/:" homedir "foo/bar") + (abbreviate-file-name (concat "/:" homedir "foo/bar")))))) + (ert-deftest files-tests-abbreviated-home-dir () "Test that changing HOME does not confuse `abbreviate-file-name'. See ." -- 2.25.1