about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2015-04-15 21:29:04 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2015-04-15 21:29:04 +0100
commitffb3168586ef04d83319b10ecf02c84ea4809447 (patch)
tree3d666adc416e6d5e26abeb4443fa717f06e41e47
parent3bf8cab82e32fc6903be995a5b6d7276307b22fe (diff)
downloadzsh-ffb3168586ef04d83319b10ecf02c84ea4809447.tar.gz
zsh-ffb3168586ef04d83319b10ecf02c84ea4809447.tar.xz
zsh-ffb3168586ef04d83319b10ecf02c84ea4809447.zip
34901: Test for the previous commit
-rw-r--r--ChangeLog2
-rw-r--r--Test/A04redirect.ztst17
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e41d8b893..05d4cf094 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-04-15  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 34901: Test/A04redirect.ztst: Test for the foregoing.
+
 	* 34900: Src/exec.c: assignment before an "exec" with
 	a redirection, with and without POSIXBUILTINS.
 
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 13f1f7cb5..602341d05 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -538,3 +538,20 @@
   print $functions[noredirfn]
 0:Output from $functions[] for definition with no redirection
 >	print This rather boring function has no redirection.
+
+  (x=43
+   x=$(print This should appear, really >&2; print Not used) exec >test.log
+   print x=$x)
+   cat test.log
+0:Assignment with exec used for redirection: no POSIX_BUILTINS
+>x=43
+?This should appear, really
+
+  (setopt POSIX_BUILTINS
+   x=45
+   x=$(print This should appear, too >&2; print And this) exec >test.log
+   print x=$x)
+   cat test.log
+0:Assignment with exec used for redirection: POSIX_BUILTINS
+>x=And this
+?This should appear, too