emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 66b75d3: archive-int-to-mode: Fix order of testing


From: Tino Calancha
Subject: [Emacs-diffs] master 66b75d3: archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
Date: Tue, 15 Aug 2017 02:46:17 -0400 (EDT)

branch: master
commit 66b75d3f2002459edccd241af57c63b380b192d3
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
    
    * lisp/arc-mode.el (archive-int-to-mode):
    Swap order of 2048 and 1024 tests (Bug#28092).
    * test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
    Update test.
---
 lisp/arc-mode.el            | 8 ++++----
 test/lisp/arc-mode-tests.el | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index bd7548b..938c143 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -559,13 +559,13 @@ FLOAT, if non-nil, means generate and return a float 
instead of an integer
     (if (zerop (logand   256 mode)) ?- ?r)
     (if (zerop (logand   128 mode)) ?- ?w)
     (if (zerop (logand    64 mode))
-       (if (zerop (logand  1024 mode)) ?- ?S)
-      (if (zerop (logand  1024 mode)) ?x ?s))
+       (if (zerop (logand  2048 mode)) ?- ?S)
+      (if (zerop (logand  2048 mode)) ?x ?s))
     (if (zerop (logand    32 mode)) ?- ?r)
     (if (zerop (logand    16 mode)) ?- ?w)
     (if (zerop (logand     8 mode))
-       (if (zerop (logand  2048 mode)) ?- ?S)
-      (if (zerop (logand  2048 mode)) ?x ?s))
+       (if (zerop (logand  1024 mode)) ?- ?S)
+      (if (zerop (logand  1024 mode)) ?x ?s))
     (if (zerop (logand     4 mode)) ?- ?r)
     (if (zerop (logand     2 mode)) ?- ?w)
     (if (zerop (logand     1 mode)) ?- ?x)))
diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el
index 04047ba..8c8465d 100644
--- a/test/lisp/arc-mode-tests.el
+++ b/test/lisp/arc-mode-tests.el
@@ -27,7 +27,8 @@
                      (cons 420 "-rw-r--r--")
                      (cons 292 "-r--r--r--")
                      (cons 512 "----------")
-                     (cons 1024 "---S------"))))
+                     (cons 1024 "------S---") ; Bug#28092
+                     (cons 2048 "---S------"))))
     (dolist (x alist)
       (should (equal (cdr x) (archive-int-to-mode (car x)))))))
 



reply via email to

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