emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/nonspecial-handlers a1f600f 1/2: Also test and fix


From: Noam Postavsky
Subject: [Emacs-diffs] scratch/nonspecial-handlers a1f600f 1/2: Also test and fix file-newer-than-file-p with 2nd arg "/:" quoted
Date: Fri, 26 Jan 2018 16:59:52 -0500 (EST)

branch: scratch/nonspecial-handlers
commit a1f600f51e37fbb44bc524440ee5702590dd7164
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Also test and fix file-newer-than-file-p with 2nd arg "/:" quoted
    
    * test/lisp/files-tests.el (files-file-name-non-special-handlers):
    Test "/:" quoted files in both positions of multi-file operations.
    * lisp/files.el (file-name-non-special): Handle "/:" quoted file names
    for both arguments of file-newer-than-file-p.
---
 lisp/files.el            | 1 +
 test/lisp/files-tests.el | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/lisp/files.el b/lisp/files.el
index 5766403..932b319 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7026,6 +7026,7 @@ only these files will be asked to be saved."
                            (file-name-completion 0 1)
                            (file-name-all-completions 0 1)
                             (file-equal-p 0 1)
+                            (file-newer-than-file-p 0 1)
                            (write-region 2 5)
                            (rename-file 0 1)
                            (copy-file 0 1)
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index 98a8f9a..e90b260 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -389,11 +389,13 @@ be invoked with the right arguments."
                        (file-directory-p tmpdir)))
         (should (file-equal-p nospecial tmpfile))
         (should (file-equal-p tmpfile nospecial))
+        (should (file-equal-p nospecial nospecial))
         (should-not (file-executable-p nospecial))
         (should (file-exists-p nospecial))
         (should (file-in-directory-p nospecial temporary-file-directory))
         (should-not (file-in-directory-p nospecial nospecial-dir))
         (should-not (file-in-directory-p tmpfile nospecial-dir))
+        (should-not (file-in-directory-p nospecial nospecial-dir))
         (should-not (file-local-copy nospecial)) ; Already local.
         (should (equal (file-modes nospecial)
                        (file-modes tmpfile)))
@@ -411,6 +413,8 @@ be invoked with the right arguments."
         (should (equal (file-name-sans-versions nospecial)
                        nospecial))
         (should-not (file-newer-than-file-p nospecial tmpfile))
+        (should-not (file-newer-than-file-p tmpfile nospecial))
+        (should-not (file-newer-than-file-p nospecial nospecial))
         (should (equal (file-ownership-preserved-p nospecial)
                        (file-ownership-preserved-p tmpfile)))
         (should (file-readable-p nospecial))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]