[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 23/25: fixes for chmodat test
From: |
Mike Gran |
Subject: |
[Guile-commits] 23/25: fixes for chmodat test |
Date: |
Thu, 10 Nov 2022 18:06:19 -0500 (EST) |
mike121 pushed a commit to branch wip-mingw
in repository guile.
commit bb646c42f7e9a3ad350ccb78168087dfda6228a7
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Thu Nov 10 12:28:12 2022 -0800
fixes for chmodat test
* test-suite/tests/filesys.test (chmodat): some chmodat tests don't test if
it
exists. Mark unwritable file writable before deleting.
("port representing a regular file"): reorder to avoid unclosed
port on exception.
---
test-suite/tests/filesys.test | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test-suite/tests/filesys.test b/test-suite/tests/filesys.test
index 45e77c823..f99677de0 100644
--- a/test-suite/tests/filesys.test
+++ b/test-suite/tests/filesys.test
@@ -394,14 +394,21 @@
(stat:perms (stat (test-file))))
(pass-if-exception "not a port" exception:wrong-type-arg
+ (unless (defined? 'chmodat)
+ (throw 'unsupported))
(chmodat "bogus" (test-file) #o300))
(pass-if-exception "not a file port" exception:wrong-type-arg
+ (unless (defined? 'chmodat)
+ (throw 'unsupported))
(chmodat (open-input-string "") (test-file) #o300))
(pass-if-exception "closed port" exception:wrong-type-arg
+ (unless (defined? 'chmodat)
+ (throw 'unsupported))
(chmodat (call-with-port (open "." O_RDONLY) identity) (test-file) #o300))
+ (chmod (test-file) #o600)
(delete-file (test-file)))
(with-test-prefix "chdir"
@@ -474,10 +481,10 @@
(readlink '(stuff)))))
(pass-if-equal "port representing a regular file" EINVAL
+ (unless (provided? 'readlink-port)
+ (throw 'unsupported))
(call-with-input-file (test-file)
(lambda (port)
- (unless (provided? 'readlink-port)
- (throw 'unsupported))
(catch 'system-error
(lambda ()
(readlink port)
- [Guile-commits] branch wip-mingw updated (de06bc7bd -> 3c9052b26), Mike Gran, 2022/11/10
- [Guile-commits] 01/25: gnulib: Import the gethostname module., Mike Gran, 2022/11/10
- [Guile-commits] 08/25: squash! Fix 'absolute-file-name?' and others for cross-build to MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 10/25: Install 'mingw_take_signal' on MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 21/25: Revert "squash! Fix 'absolute-file-name?' and others for cross-build to MinGW.", Mike Gran, 2022/11/10
- [Guile-commits] 23/25: fixes for chmodat test,
Mike Gran <=
- [Guile-commits] 06/25: Clear errno before CreateProcess for MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 04/25: Add 'set-port-binary/text-mode!' procedure for MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 03/25: mingw: canonicalize-path: Also canonicalize drive letter and '/'., Mike Gran, 2022/11/10
- [Guile-commits] 02/25: Link fix for MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 09/25: Make `read-bytes' suspendable for socket reads on MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 11/25: Add `scm_sigaction_for_thread' stub for MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 12/25: DRAFT Add partial `scm_fcntl' support for MinGW., Mike Gran, 2022/11/10
- [Guile-commits] 14/25: REMOVEME mingw: Hardcode compile-time-file-name-convention to 'mingw., Mike Gran, 2022/11/10
- [Guile-commits] 15/25: REMOVEME guix: guile-mingw: Hardcode file-name-convention., Mike Gran, 2022/11/10
- [Guile-commits] 16/25: DEBUG guile.cmd, wine-guile.sh: Some Wine help., Mike Gran, 2022/11/10