diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-12-19 17:29:40 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-12-19 17:29:40 +0200 |
commit | cc63704815ee4ae686a0cf86e12f7f2596dd22a3 (patch) | |
tree | f0d6215f0f35bf3538ec3601e49bc54f0d91f0fa /test/src/filelock-tests.el | |
parent | 8f82a83caec9ad48a6d4abc4dc26bed67f0e89e3 (diff) | |
download | emacs-cc63704815ee4ae686a0cf86e12f7f2596dd22a3.tar.gz emacs-cc63704815ee4ae686a0cf86e12f7f2596dd22a3.tar.bz2 emacs-cc63704815ee4ae686a0cf86e12f7f2596dd22a3.zip |
New error symbol 'permission-denied'
* src/fileio.c (syms_of_fileio) <permission-denied>: Define the
symbol and its 'err-conditions' and 'error-message' properties.
(get_file_errno_data): Return permission-denied on EACCES.
* test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled)
(filelock-tests-unlock-spoiled)
(filelock-tests-kill-buffer-spoiled): Adapt the tests to the new
error symbol.
* doc/lispref/errors.texi (Standard Errors):
* etc/NEWS: Document 'permission-denied' error.
Diffstat (limited to 'test/src/filelock-tests.el')
-rw-r--r-- | test/src/filelock-tests.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/src/filelock-tests.el b/test/src/filelock-tests.el index ba001679639..2d682e2e789 100644 --- a/test/src/filelock-tests.el +++ b/test/src/filelock-tests.el @@ -123,7 +123,7 @@ the case)." (filelock-tests--spoil-lock-file buffer-file-truename) (let ((err (should-error (file-locked-p (buffer-file-name))))) (should (equal (seq-subseq err 0 2) - '(file-error "Testing file lock"))))))) + '(permission-denied "Testing file lock"))))))) (ert-deftest filelock-tests-unlock-spoiled () "Check that `unlock-buffer' fails if the lockfile is \"spoiled\"." @@ -144,7 +144,7 @@ the case)." (lambda (err) (push err errors)))) (unlock-buffer)) (should (consp errors)) - (should (equal '(file-error "Unlocking file") + (should (equal '(permission-denied "Unlocking file") (seq-subseq (car errors) 0 2))) (should (equal (length errors) 1)))))) @@ -174,7 +174,7 @@ the case)." (lambda (err) (push err errors)))) (kill-buffer)) (should (consp errors)) - (should (equal '(file-error "Unlocking file") + (should (equal '(permission-denied "Unlocking file") (seq-subseq (car errors) 0 2))) (should (equal (length errors) 1)))))) |