about summary refs log tree commit diff
path: root/Test/A04redirect.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/A04redirect.ztst')
-rw-r--r--Test/A04redirect.ztst7
1 files changed, 3 insertions, 4 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 993138e7d..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
 
@@ -440,7 +439,7 @@
 # This tests the here-string to filename optimisation; we can't
 # test that it's actually being optimised, but we can test that it
 # still works.
-  cat =(<<<$'This string has been replaced\nby a file containing it.\n')
+  cat =(<<<$'This string has been replaced\nby a file containing it.')
 0:Optimised here-string to filename
 >This string has been replaced
 >by a file containing it.