Delete temp directory after bytecomp test
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--not-writable-directory): Allow deletion of directory (bug#51690). * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--dest-mountpoint): Ditto.
This commit is contained in:
parent
35f9e0f469
commit
97fa2ffdf7
1 changed files with 37 additions and 29 deletions
|
@ -1246,6 +1246,8 @@ writable (Bug#44631)."
|
|||
(byte-compile-dest-file-function
|
||||
(lambda (_) output-file))
|
||||
(byte-compile-error-on-warn t))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(write-region "" nil input-file nil nil nil 'excl)
|
||||
(write-region "" nil output-file nil nil nil 'excl)
|
||||
(set-file-modes input-file #o400)
|
||||
|
@ -1254,7 +1256,9 @@ writable (Bug#44631)."
|
|||
(should (byte-compile-file input-file))
|
||||
(should (file-regular-p output-file))
|
||||
(should (cl-plusp (file-attribute-size
|
||||
(file-attributes output-file)))))))
|
||||
(file-attributes output-file)))))
|
||||
;; Allow the directory to be deleted.
|
||||
(set-file-modes directory #o777)))))
|
||||
|
||||
(ert-deftest bytecomp-tests--dest-mountpoint ()
|
||||
"Test that byte compilation works if the destination file is a
|
||||
|
@ -1277,6 +1281,8 @@ mountpoint (Bug#44631)."
|
|||
(should-not (file-remote-p output-file))
|
||||
(write-region "" nil input-file nil nil nil 'excl)
|
||||
(write-region "" nil output-file nil nil nil 'excl)
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-file-modes input-file #o400)
|
||||
(set-file-modes output-file #o200)
|
||||
(set-file-modes directory #o500)
|
||||
|
@ -1296,7 +1302,9 @@ mountpoint (Bug#44631)."
|
|||
(output . ,(buffer-string)))))))
|
||||
(should (file-regular-p output-file))
|
||||
(should (cl-plusp (file-attribute-size
|
||||
(file-attributes output-file))))))))
|
||||
(file-attributes output-file)))))
|
||||
;; Allow the directory to be deleted.
|
||||
(set-file-modes directory #o777))))))
|
||||
|
||||
(ert-deftest bytecomp-tests--target-file-no-directory ()
|
||||
"Check that Bug#45287 is fixed."
|
||||
|
|
Loading…
Add table
Reference in a new issue