emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ecda09c: ; * test/lisp/net/tramp-tests.el (tramp-te


From: Michael Albinus
Subject: [Emacs-diffs] master ecda09c: ; * test/lisp/net/tramp-tests.el (tramp-test24-file-acl): More instrumentation
Date: Sun, 19 Nov 2017 05:06:28 -0500 (EST)

branch: master
commit ecda09c22dd546af70cc02bd6211640f5b38558d
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    ; * test/lisp/net/tramp-tests.el (tramp-test24-file-acl): More 
instrumentation
---
 test/lisp/net/tramp-tests.el | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 6d5cc5d..1ad286b 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2942,23 +2942,14 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
            (should (file-acl tmp-name1))
            (copy-file tmp-name1 tmp-name2 nil nil nil 'preserve-permissions)
            (should (file-acl tmp-name2))
-            (tramp--test-message
-             "tmp-name1:\n%stmp-name2:\n%s"
-             (file-acl tmp-name1) (file-acl tmp-name2))
            (should (string-equal (file-acl tmp-name1) (file-acl tmp-name2)))
            ;; Different permissions mean different ACLs.
            (set-file-modes tmp-name1 #o777)
            (set-file-modes tmp-name2 #o444)
-            (tramp--test-message
-             "tmp-name1:\n%stmp-name2:\n%s"
-             (file-acl tmp-name1) (file-acl tmp-name2))
            (should-not
             (string-equal (file-acl tmp-name1) (file-acl tmp-name2)))
            ;; Copy ACL.
            (should (set-file-acl tmp-name2 (file-acl tmp-name1)))
-            (tramp--test-message
-             "tmp-name1:\n%stmp-name2:\n%s"
-             (file-acl tmp-name1) (file-acl tmp-name2))
            (should (string-equal (file-acl tmp-name1) (file-acl tmp-name2)))
            ;; An invalid ACL does not harm.
            (should-not (set-file-acl tmp-name2 "foo")))
@@ -2989,12 +2980,13 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
              (file-acl tmp-name1) (file-acl tmp-name3))
            (should-not
             (string-equal (file-acl tmp-name1) (file-acl tmp-name3)))
-           ;; Copy ACL.
-           (set-file-acl tmp-name3 (file-acl tmp-name1))
-            (tramp--test-message
-             "tmp-name1:\n%stmp-name3:\n%s"
-             (file-acl tmp-name1) (file-acl tmp-name3))
-           (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3)))
+           ;; Copy ACL.  Since we don't know whether Emacs is built
+           ;; with local ACL support, we must check it.
+           (when (set-file-acl tmp-name3 (file-acl tmp-name1))
+              (tramp--test-message
+               "tmp-name1:\n%stmp-name3:\n%s"
+               (file-acl tmp-name1) (file-acl tmp-name3))
+             (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3))))
 
            ;; Two files with same ACLs.
            (delete-file tmp-name1)



reply via email to

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