[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 61c2b8815b 6/6: Test with-file-modes
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 61c2b8815b 6/6: Test with-file-modes |
Date: |
Thu, 5 Jan 2023 07:57:28 -0500 (EST) |
branch: externals/compat
commit 61c2b8815b3a252659fb7e427b1a816b051d05de
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Test with-file-modes
---
compat-25.el | 2 +-
compat-tests.el | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/compat-25.el b/compat-25.el
index afc82b64c8..b58dcf6145 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -76,7 +76,7 @@ Case is significant.
Symbols are also allowed; their print names are used instead."
(string-lessp string2 string1))
-(compat-defmacro with-file-modes (modes &rest body) ;; <UNTESTED>
+(compat-defmacro with-file-modes (modes &rest body) ;; <OK>
"Execute BODY with default file permissions temporarily set to MODES.
MODES is as for `set-default-file-modes'."
(declare (indent 1) (debug t))
diff --git a/compat-tests.el b/compat-tests.el
index 542d4926a3..db2fea3637 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -649,6 +649,12 @@
(should-equal "1 k" (compat-call file-size-human-readable 1000 'si " "))
(should-equal "1 kA" (compat-call file-size-human-readable 1000 'si " "
"A")))
+(ert-deftest with-file-modes ()
+ (let ((old (default-file-modes)))
+ (with-file-modes (1+ old)
+ (should-equal (default-file-modes) (1+ old)))
+ (should-equal (default-file-modes) old)))
+
(ert-deftest file-modes-number-to-symbolic ()
(should-equal "-rwx------" (file-modes-number-to-symbolic #o700))
(should-equal "-rwxrwx---" (file-modes-number-to-symbolic #o770))
- [elpa] externals/compat updated (501acae2b9 -> 61c2b8815b), ELPA Syncer, 2023/01/05
- [elpa] externals/compat e84b1117e5 3/6: Test file-name-parent-directory, ELPA Syncer, 2023/01/05
- [elpa] externals/compat dc8cda7c44 5/6: Manual: provided-mode-derived-p is supported, ELPA Syncer, 2023/01/05
- [elpa] externals/compat 61c2b8815b 6/6: Test with-file-modes,
ELPA Syncer <=
- [elpa] externals/compat 55b45f8d06 4/6: Fix typos in manual, ELPA Syncer, 2023/01/05
- [elpa] externals/compat b467df10ca 1/6: Add file-attribute-file-identifier, ELPA Syncer, 2023/01/05
- [elpa] externals/compat d289bf66f7 2/6: Add file-name-split, ELPA Syncer, 2023/01/05