From: German Riano <griano@yahoo.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: PATCH: correct A04redirect.ztst so that it works on VSCode
Date: Tue, 28 Nov 2023 22:18:01 +0000 (UTC) [thread overview]
Message-ID: <354453770.648505.1701209881415@mail.yahoo.com> (raw)
In-Reply-To: <354453770.648505.1701209881415.ref@mail.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
VSCode sometimes opens certain file descriptors whan you run a terminal nested in it. The tests A04redirect.ztst assumes fd 99 isnot used and hence tries to gather an error message from
echo >&99
However, if the fd 99 has been previously opened there is no error, the error message is empty andsubsequent comparisons to it fail.
In this patch I propose to test fd 99, 100, 101, … until anunused fd is found. With this change the test passes even if the terminal is in VScode.
GR
-------
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 17f6dfa29..c5120ca8f 100644
--- a/Test/A04redirect.ztst
+++b/Test/A04redirect.ztst
@@ -4,7+4,8 @@
mkdir redir.tmp && cd redir.tmp
myfd=99
- (echo>&$myfd) 2>msg
+ # Find an unused fd
+ while (echo>&$myfd) 2>msg ;do ((myfd++)); done
bad_fd_msg="${$(<msg)##*:}"
%test
[-- Attachment #2: Type: text/html, Size: 38389 bytes --]
next parent reply other threads:[~2023-11-28 22:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <354453770.648505.1701209881415.ref@mail.yahoo.com>
2023-11-28 22:18 ` German Riano [this message]
2023-11-29 17:45 ` Bart Schaefer
2023-11-29 17:51 ` Bart Schaefer
2023-11-30 10:29 ` Peter Stephenson
2023-11-30 20:59 ` Bart Schaefer
2023-12-02 23:05 ` Bart Schaefer
2023-12-02 23:10 ` Bart Schaefer
2023-12-02 23:12 ` Bart Schaefer
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=354453770.648505.1701209881415@mail.yahoo.com \
--to=griano@yahoo.com \
--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).