From 6a67d38e969fe0acacf3191291e44a862376321f Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 30 Dec 2019 21:48:44 +0000 Subject: users/24582 + users/24583: Add regression tests for the previous commit. --- Test/D04parameter.ztst | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ Test/Y01completion.ztst | 9 +++++++ 2 files changed, 77 insertions(+) (limited to 'Test') 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 -- cgit 1.4.1