summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/files.el3
-rw-r--r--test/lisp/files-tests.el13
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 9b1fc09fcfa..22313b71635 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -8742,6 +8742,9 @@ arguments as the running Emacs)."
(file-in-directory-p 0 1)
(make-symbolic-link 0 1)
(add-name-to-file 0 1)
+ ;; `get-file-buffer' shall simply run the
+ ;; original function.
+ (get-file-buffer)
;; These file-notify-* operations take a
;; descriptor.
(file-notify-rm-watch)
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index 55011cd461a..822e031e0bf 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -401,7 +401,8 @@ be $HOME."
(append '("foo" "$foo" "~foo")
;; No amount of quoting will allow creation of a file name
;; with an embedded '*' on MS-Windows and MS-DOS.
- (if (not (memq system-type '(windows-nt ms-dos))) '("foo*bar")))
+ (if (not (memq system-type '(windows-nt ms-dos)))
+ '("foo*bar" "foo?bar")))
"Prefixes to be tested for `file-name-non-special' tests.")
(ert-deftest files-tests-file-name-non-special--subprocess ()
@@ -696,6 +697,8 @@ unquoted file names."
(tmpdir nospecial-dir t)
(should-error (directory-files-and-attributes nospecial-dir))))
+(defvar w32-downcase-file-names)
+
(ert-deftest files-tests-directory-files-recursively-w32 ()
"Test MS-Windows specific features of `directory-files-recursively'."
(skip-unless (eq system-type 'windows-nt))
@@ -1054,12 +1057,16 @@ unquoted file names."
(ert-deftest files-tests-file-name-non-special-get-file-buffer ()
;; Make sure these buffers don't exist.
(files-tests--with-temp-non-special (tmpfile nospecial)
+ (find-file-noselect nospecial)
(let ((fbuf (get-file-buffer nospecial)))
- (if fbuf (kill-buffer fbuf))
+ (should (get-file-buffer nospecial))
+ (kill-buffer fbuf)
(should-not (get-file-buffer nospecial))))
(files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial)
+ (find-file-noselect nospecial)
(let ((fbuf (get-file-buffer nospecial)))
- (if fbuf (kill-buffer fbuf))
+ (should (get-file-buffer nospecial))
+ (kill-buffer fbuf)
(should-not (get-file-buffer nospecial)))))
(ert-deftest files-tests-file-name-non-special-insert-directory ()