summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-05-08 18:00:55 +0100
committerPeter Stephenson <pws@zsh.org>2017-05-08 18:00:55 +0100
commitaf1c82d646d2f1fa9cecbfcffd0159cc3cebe237 (patch)
tree14d2e3c92dec4c12afc753cccd4e8f301823f17f /Test
parent641a764b8203de5e5f5c9f1d6d5b0a48c26ca9e7 (diff)
downloadzsh-af1c82d646d2f1fa9cecbfcffd0159cc3cebe237.tar.gz
zsh-af1c82d646d2f1fa9cecbfcffd0159cc3cebe237.tar.xz
zsh-af1c82d646d2f1fa9cecbfcffd0159cc3cebe237.zip
40173: Off-by-one error checking for {varid}.
This caused a single unprintable character in braces before a
redirection to be treated as an indentifier.
Diffstat (limited to 'Test')
-rw-r--r--Test/A04redirect.ztst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 2671080c2..cb82751ce 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -165,6 +165,15 @@
 ?About to close a second time
 *?\(eval\):*: failed to close file descriptor *
 
+  eval $'fn-varid() { print {\x18}<<0 }'
+  { which -x2 fn-varid; fn-varid } | tr $'\x18' '?'
+0:Regression test for off-by-one in varid check
+>fn-varid () {
+>  print {?} <<0
+>0
+>}
+>{?}
+
   print foo >&-
 0:'>&-' redirection