* [PATCH] do not skip tests for [[ -r file ]] and [[ -N file ]] on Cygwin
@ 2023-05-01 11:39 Jun T
0 siblings, 0 replies; only message in thread
From: Jun T @ 2023-05-01 11:39 UTC (permalink / raw)
To: zsh-workers
Currently two test cases in C02cond.ztst are skipped on Cygwin:
[[ -r file ]]
skipped by commit baa1145609 (by Peter), Nov. 2008
[[ -N file ]]
skipped by commit 475ba659a2, May 2001
It seems these need not be skipped anymore. If you have Cygwin
please confirm that test C02 passes with the patch below.
# -r/-N will not work on FAT32 (USB stick?), but then many other tests
# would also fail. I think we can assume NTFS for our purpose.
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 4366b4142..daea5b4f8 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -111,10 +111,6 @@
if (( EUID == 0 )); then
print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]] (root reads anything)'
[[ -r zerolength && -r unmodish ]]
- elif [[ $OSTYPE = cygwin ]]; then
- print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]]
- (all files created by user may be readable)'
- [[ -r zerolength ]]
else
[[ -r zerolength && ! -r unmodish ]]
fi
@@ -148,9 +144,7 @@
print -ru $ZTST_fd 'This test may take two seconds...'
touch $newnewnew
- if [[ $OSTYPE == "cygwin" ]]; then
- ZTST_skip="[[ -N file ]] not supported on Cygwin"
- elif (( isnfs )); then
+ if (( isnfs )); then
ZTST_skip="[[ -N file ]] not supported with NFS"
elif ! zmodload -F zsh/stat b:zstat 2> /dev/null; then
ZTST_skip='[[ -N file ]] not tested; zsh/stat not available'
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-01 11:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 11:39 [PATCH] do not skip tests for [[ -r file ]] and [[ -N file ]] on Cygwin Jun T
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).