zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [PATCH] Tests for 50126, 50136, and 50149
Date: Sun, 1 May 2022 12:09:40 -0700	[thread overview]
Message-ID: <CAH+w=7ZJi=FbkvJUt6rT2R3i5NZ1VUOJ1JPdcepbkS4ib=M_og@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bby1GiKxTL9Y3M6Xuhe56EQdRHDsabbShfWNLkdkxhsg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

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.

[-- Attachment #2: test_regress.txt --]
[-- Type: text/plain, Size: 1476 bytes --]

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*

  parent reply	other threads:[~2022-05-01 19:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 18:31 A second test release before 5.9 final? Bart Schaefer
2022-04-30 21:41 ` dana
2022-05-01 14:52 ` Daniel Shahaf
2022-05-01 16:50   ` Bart Schaefer
2022-05-01 17:38     ` Daniel Shahaf
2022-05-02  2:24       ` Jun T
2022-05-02  3:10         ` Bart Schaefer
2022-05-02  4:09           ` Jun T
2022-05-02 12:58           ` Daniel Shahaf
2022-05-01 17:49     ` Peter Stephenson
2022-05-01 18:09     ` [PATCH] Test for 50101 Bart Schaefer
2022-05-01 19:09     ` Bart Schaefer [this message]
2022-05-02  4:59       ` [PATCH] Tests for 50126, 50136, and 50149 Jun T
2022-05-02  5:15         ` Bart Schaefer
2022-05-02  5:46           ` Jun T
2022-05-02 13:14         ` Jun. T
2022-05-02 16:26           ` 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='CAH+w=7ZJi=FbkvJUt6rT2R3i5NZ1VUOJ1JPdcepbkS4ib=M_og@mail.gmail.com' \
    --to=schaefer@brasslantern.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).