mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
filesys.test: skip copy-file EACCES test when root
Accidentally omitted from b3b7477128
.
* test-suite/tests/filesys.test: skip copy-file EACCES test when root.
This commit is contained in:
parent
4f39181b2f
commit
4527371d1b
1 changed files with 8 additions and 7 deletions
|
@ -62,13 +62,14 @@
|
|||
(copy-file src dest)
|
||||
(pass-if-equal "copy-file dest content" msg
|
||||
(call-with-input-file dest get-string-all)))
|
||||
(with-test-prefix "read only dest"
|
||||
(chmod dest #o444)
|
||||
(with-exception-handler
|
||||
(λ (ex)
|
||||
(pass-if-equal "errno is EACCES" EACCES (exception-errno ex)))
|
||||
(λ () (copy-file src dest))
|
||||
#:unwind? #t)))))
|
||||
(unless (zero? (geteuid))
|
||||
(with-test-prefix "read only dest"
|
||||
(chmod dest #o444)
|
||||
(with-exception-handler
|
||||
(λ (ex)
|
||||
(pass-if-equal "errno is EACCES" EACCES (exception-errno ex)))
|
||||
(λ () (copy-file src dest))
|
||||
#:unwind? #t))))))
|
||||
|
||||
;; return next prospective file descriptor number
|
||||
(define (next-fd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue