]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor tweaks in files-tests.el
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 28 Jan 2018 10:23:25 +0000 (11:23 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 28 Jan 2018 10:23:25 +0000 (11:23 +0100)
* test/lisp/files-tests.el
(files-file-name-non-special-notify-handlers): Test successful removal.
(files-file-name-non-special-handlers): Delete temp file.

test/lisp/files-tests.el

index 530d2bf62a92cf98b0ede896e480a9e034324a25..7fc5108b08e4dfbe2d56ae2fc49c226f90bd9510 100644 (file)
@@ -343,7 +343,8 @@ be invoked with the right arguments."
     (let* ((nospecial (concat "/:" tmpfile))
            (watch (file-notify-add-watch nospecial '(change) #'ignore)))
       (should (file-notify-valid-p watch))
-      (file-notify-rm-watch watch))))
+      (file-notify-rm-watch watch)
+      (should-not (file-notify-valid-p watch)))))
 
 (ert-deftest files-file-name-non-special-dired-compress-handler ()
   ;; `dired-compress-file' can get confused by filenames with ":" in
@@ -366,7 +367,8 @@ be invoked with the right arguments."
         (should (null (access-file nospecial "test")))
         (let ((newname (concat nospecial "add-name")))
           (add-name-to-file nospecial newname)
-          (should (file-exists-p newname)))
+          (should (file-exists-p newname))
+          (delete-file newname))
         (should (equal (byte-compiler-base-file-name nospecial)
                        (byte-compiler-base-file-name tmpfile)))
         (let ((newname (concat (directory-file-name nospecial-dir)