From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] do not skip tests for [[ -r file ]] and [[ -N file ]] on Cygwin
Date: Mon, 1 May 2023 20:39:31 +0900 [thread overview]
Message-ID: <7683CD71-EA4F-49DC-91CD-B393584615EB@kba.biglobe.ne.jp> (raw)
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'
reply other threads:[~2023-05-01 11:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7683CD71-EA4F-49DC-91CD-B393584615EB@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).