diff options
| author | Chet Ramey <chet.ramey@case.edu> | 2018-11-23 15:32:57 -0500 |
|---|---|---|
| committer | Chet Ramey <chet.ramey@case.edu> | 2018-11-23 15:32:57 -0500 |
| commit | 2ae59c1134a75d5778997b7202b15b0586283042 (patch) | |
| tree | 6a0fa496d41b222f5f69e3640d84932fb7a84778 /tests/array22.sub | |
| parent | 2f5dfe5a18b4670eb4cea32c1c76295eb70a8865 (diff) | |
| download | bash-5.0-beta2.tar.gz | |
bash-5.0-beta2 releasebash-5.0-beta2
Diffstat (limited to 'tests/array22.sub')
| -rw-r--r-- | tests/array22.sub | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/array22.sub b/tests/array22.sub index e0463c34..adae6e1a 100644 --- a/tests/array22.sub +++ b/tests/array22.sub @@ -7,6 +7,7 @@ unset a echo a2 a[1]=; recho "${a[@]:-y}" +a[1]=; recho "${a[*]:-z}" unset a echo a3 @@ -32,3 +33,14 @@ shift $# echo p3 set '' x recho ${@:+y} + +# problems with * and null expansions dating back to bash's earliest days +A=(''); set -- '' + +echo "<${A[*]:-X}>" "<${*:-X}>" "<${A:-X}>" "<${A[0]:-X}>" + +IFS= +A=('' ''); set -- '' '' +B='' + +echo "<${A[*]:-X}>" "<${*:-X}>" "<${B:-X}>" "<${B[*]:-X}>" |
