From af1c82d646d2f1fa9cecbfcffd0159cc3cebe237 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 8 May 2017 18:00:55 +0100 Subject: 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. --- Test/A04redirect.ztst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Test/A04redirect.ztst') 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 -- cgit 1.4.1