Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Tests for 50126, 50136, and 50149
- X-seq: zsh-workers 50160
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [PATCH] Tests for 50126, 50136, and 50149
- Date: Sun, 1 May 2022 12:09:40 -0700
- Archived-at: <https://zsh.org/workers/50160>
- In-reply-to: <CAH+w=7bby1GiKxTL9Y3M6Xuhe56EQdRHDsabbShfWNLkdkxhsg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Zf5b_1YFy1_2p3fJ1h-oWuvRnmRE4HjDGa3z=+54UgyA@mail.gmail.com> <2d3ff4e4-b705-4823-a49b-ba8844bd1b05@www.fastmail.com> <CAH+w=7bby1GiKxTL9Y3M6Xuhe56EQdRHDsabbShfWNLkdkxhsg@mail.gmail.com>
These are short, so I kept them all in one patch.
I was surprised that the existing Xfail test for temp file removal was
still failing, so I added some explanatory comments. That one can
probably be fixed after release.
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst
index 1e5cd9f6c..d68db35fa 100644
--- a/Test/D03procsubst.ztst
+++ b/Test/D03procsubst.ztst
@@ -167,5 +167,25 @@
print -rC1 -- $TMPPREFIX*(N)
}
0f:external command with =(...) on LHS of pipeline cleans up its tempfiles
+F:subshells including pipe LHS do not pass through zexit()
# (Expected result: no output.)
+# Confirm tempfile exists in the function, but not after exit
+ () {
+ local -x TMPPREFIX=$PWD/exit
+ $ZTST_testdir/../Src/zsh -fc '
+ () {
+ print -rC1 -- $TMPPREFIX*
+ exit
+ } =(sleep 5)
+ '
+ print -rC1 -- $TMPPREFIX*(N)
+ }
+0:regression test: exit in shell function cleans up tempfiles
+F:see preceding test
+*>*.tmp/exit*
+
+ print -u $ZTST_fd 'This test hangs the shell when it fails...'
+ true | false =(nosuchcommand$$)
+1:regression test: race condition with pipe and procsubst
+*?\(eval\):2: command not found: nosuchcommand*
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 72749e6ab..b57b23557 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -752,6 +752,12 @@
>These are the contents of the file
>These are the contents of the file
+# Subshell to shield nullexec redirections
+ ( exec 3>&1 3>&2; print -u 3 some words )
+0:regression test: multios with nullexec
+>some words
+?some words
+
# tried this with other things, but not on its own, so much.
unsetopt nomatch
print with nonomatch: flooble*
Messages sorted by:
Reverse Date,
Date,
Thread,
Author