Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: correct A04redirect.ztst so that it works on VSCode



On Sat, Dec 2, 2023 at 3:10 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Sat, Dec 2, 2023 at 3:05 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > Patch.
>
> Ugh, apologies for the unrelated chunks in there, ignore everything
> but the first.

Gaah.  Everything but the LAST hunk.  Here it is again.
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 17f6dfa29..dc62efab3 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -3,9 +3,8 @@
 %prep
   mkdir redir.tmp && cd redir.tmp
 
-  myfd=99
-  (echo >&$myfd) 2>msg
-  bad_fd_msg="${$(<msg)##*:}"
+  bad_fd_msg="${$( { exec 9>&-; echo >&9 } 2>&1)##*:}"
+  [[ -n "$bad_fd_msg" ]]
 
 %test
 


Messages sorted by: Reverse Date, Date, Thread, Author