[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master aca235c: ; Fix duplicate temporary file creation
From: |
Stefan Kangas |
Subject: |
master aca235c: ; Fix duplicate temporary file creation |
Date: |
Sun, 7 Nov 2021 18:47:28 -0500 (EST) |
branch: master
commit aca235cb94b9b717de6e65b662b878362af26d57
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
; Fix duplicate temporary file creation
* test/lisp/files-tests.el (files-tests-executable-find): Fix creating
duplicate temporary file after recent change.
---
test/lisp/files-tests.el | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index cf9d87f..c6d7c19 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -1383,25 +1383,24 @@ See <https://debbugs.gnu.org/19657#20>."
See <https://debbugs.gnu.org/35241>."
(ert-with-temp-file tmpfile
:suffix (car exec-suffixes)
- (let ((tmpfile (make-temp-file "files-test" nil )))
- (set-file-modes tmpfile #o777)
- (let ((exec-path `(,temporary-file-directory)))
- (should
- (equal tmpfile
- (executable-find (file-name-nondirectory tmpfile)))))
- ;; An empty element of `exec-path' means `default-directory'.
- (let ((default-directory temporary-file-directory)
- (exec-path nil))
- (should
- (equal tmpfile
- (executable-find (file-name-nondirectory tmpfile)))))
- ;; The remote file name shall be quoted, and handled like a
- ;; non-existing directory.
- (let ((default-directory "/ssh::")
- (exec-path (append exec-path `("." ,temporary-file-directory))))
- (should
- (equal tmpfile
- (executable-find (file-name-nondirectory tmpfile))))))))
+ (set-file-modes tmpfile #o755)
+ (let ((exec-path `(,temporary-file-directory)))
+ (should
+ (equal tmpfile
+ (executable-find (file-name-nondirectory tmpfile)))))
+ ;; An empty element of `exec-path' means `default-directory'.
+ (let ((default-directory temporary-file-directory)
+ (exec-path nil))
+ (should
+ (equal tmpfile
+ (executable-find (file-name-nondirectory tmpfile)))))
+ ;; The remote file name shall be quoted, and handled like a
+ ;; non-existing directory.
+ (let ((default-directory "/ssh::")
+ (exec-path (append exec-path `("." ,temporary-file-directory))))
+ (should
+ (equal tmpfile
+ (executable-find (file-name-nondirectory tmpfile)))))))
(ert-deftest files-tests-dont-rewrite-precious-files ()
"Test that `file-precious-flag' forces files to be saved by
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master aca235c: ; Fix duplicate temporary file creation,
Stefan Kangas <=