[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 11/50: fixes for chmodat test
From: |
Mike Gran |
Subject: |
[Guile-commits] 11/50: fixes for chmodat test |
Date: |
Mon, 31 Mar 2025 01:04:01 -0400 (EDT) |
mike121 pushed a commit to branch wip-mingw-2025
in repository guile.
commit 9d625278f7ff80a69e8dc8bd95a983af972d7955
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 5ff738886..55f67e41a 100644
--- a/test-suite/tests/filesys.test
+++ b/test-suite/tests/filesys.test
@@ -434,14 +434,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"
@@ -515,10 +522,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-2025 created (now 2a7c9292b), Mike Gran, 2025/03/31
- [Guile-commits] 11/50: fixes for chmodat test,
Mike Gran <=
- [Guile-commits] 12/50: Allows modification of shell used by open-pipe, Mike Gran, 2025/03/31
- [Guile-commits] 17/50: In lightening, don't use visibility hidden on DLL using systems, Mike Gran, 2025/03/31
- [Guile-commits] 44/50: Sort goops class precedence tests to have a more reproducible check-guile.log, Mike Gran, 2025/03/31
- [Guile-commits] 23/50: Replace SCM_INLINE_GC_KIND_* enums with libgc's GC_I_* defines, Mike Gran, 2025/03/31
- [Guile-commits] 02/50: mingw: canonicalize-path: Also canonicalize drive letter and '/'., Mike Gran, 2025/03/31
- [Guile-commits] 14/50: in filesys test, add helper function for deleting files and symlinks, Mike Gran, 2025/03/31
- [Guile-commits] 05/50: Make `read-bytes' suspendable for socket reads on MinGW., Mike Gran, 2025/03/31
- [Guile-commits] 15/50: filesys.test: fixes for copy-file test on MinGW, Mike Gran, 2025/03/31
- [Guile-commits] 19/50: Lightening: _WIN32 updates from upstream lightning, Mike Gran, 2025/03/31
- [Guile-commits] 20/50: Win32: don't setjmp to Guile frames, Mike Gran, 2025/03/31