about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Test/D04parameter.ztst68
-rw-r--r--Test/Y01completion.ztst9
3 files changed, 83 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 98d965353..204448465 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-31  Daniel Shahaf  <danielsh@apache.org>
+
+	* users/24582 + users/24583: Test/D04parameter.ztst,
+	Test/Y01completion.ztst: Add regression tests for the previous
+	commit.
+
 2019-12-30  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* users/24581: Src/Zle/zle_tricky.c, Src/hist.c: Array assignments
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index c91af1a9c..899b8f498 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -640,6 +640,74 @@
 >echo
 >$(|||) bar
 
+ argv=(
+  $'a=() b=()'
+  $'a=(foo) b=(bar)'
+  $'a=(foo) b=() c=() d=(bar) e=(baz) f=() g=()'
+  $'a=(foo) b=() c=() d=(bar)\ne=(baz) f=() g=()'
+  $'a=(foo) b=() d=(bar)'
+ )
+ for 1; print -rl -- ${(z)1} && print
+0:${(z)} regression test: multiple array assignments
+>a=(
+>)
+>b=(
+>)
+>
+>a=(
+>foo
+>)
+>b=(
+>bar
+>)
+>
+>a=(
+>foo
+>)
+>b=(
+>)
+>c=(
+>)
+>d=(
+>bar
+>)
+>e=(
+>baz
+>)
+>f=(
+>)
+>g=(
+>)
+>
+>a=(
+>foo
+>)
+>b=(
+>)
+>c=(
+>)
+>d=(
+>bar
+>)
+>;
+>e=(
+>baz
+>)
+>f=(
+>)
+>g=(
+>)
+>
+>a=(
+>foo
+>)
+>b=(
+>)
+>d=(
+>bar
+>)
+>
+
   foo=$'\x06ZUI\x1f text-field example: \x1azuitfieldtfield1_1\x1a\'\'\x1a\'\'\x1a1\x1aZUI\\[my_tfield1_width\\]\x1aZUI\\[my_tfield1_start\\]\x1aZUI\\[my_tfield1_data\\]\x1c'
   print "${#${(z@)foo}}"
 0:Test real-world data that once seemed to fail
diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index 7ef319f7b..51f604bcf 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -216,6 +216,15 @@ F:regression test workers/31611
 >NO:{3pm}
 >NO:{10pm}
 
+ comptest $'a=() b=(\t'
+0:multiple envarrays
+>line: {a=() b=(}{}
+>DESCRIPTION:{file}
+>DI:{dir1}
+>DI:{dir2}
+>FI:{file1}
+>FI:{file2}
+
 %clean
 
   zmodload -ui zsh/zpty