about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-07-16 13:52:16 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-07-16 13:52:16 -0700
commite63065e8e58069de8ea7a18a3830ef5b0f4f45f7 (patch)
treee62f675f4560868b07d22513f6fdba558e4be58c
parenta0862f6381979b165e864e9c5b97d12432d35d48 (diff)
downloadzsh-e63065e8e58069de8ea7a18a3830ef5b0f4f45f7.tar.gz
zsh-e63065e8e58069de8ea7a18a3830ef5b0f4f45f7.tar.xz
zsh-e63065e8e58069de8ea7a18a3830ef5b0f4f45f7.zip
35805: tests for 35799
-rw-r--r--ChangeLog4
-rw-r--r--Test/E01options.ztst14
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f3ecfbd2..ad2d53198 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-16  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 35805: Test/E01options.ztst: tests for 35799
+
 2015-07-15  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 35799: Src/params.c: with NO_EXEC, parse parameter subscript
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index ca3f06ca8..16279b88a 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -362,6 +362,20 @@
   echo ${unset_var?Not an error})
 0:NO_EXEC should not test for unset variables
 
+  (setopt noexec
+  : ${${string%[aeiou]*}/(#m)?(#e)/${(U)MATCH}}  Rule 1
+  : ${array[4,5][1][2,3]}                        Rule 2
+  : ${${(P)foo[1,6]}[1,3]}                       Rule 3
+  : "${${(@)array}[1,2]}"                        Rule 5
+  : "${(@)${(@)array}[1,2]#?}"                   Rule 6
+  : ${(el.20..X.)${bar}}                         Rule 11 success case)
+0:NO_EXEC handles parameter substitution examples
+
+  (setopt noexec
+  : ${(el.20..X.)$bar}                           Rule 11 failure case)
+1:NO_EXEC does recognize bad substitution syntax
+*?* bad substitution
+
   setopt NO_eval_lineno
   eval 'print $LINENO'
   setopt eval_lineno