mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-21 21:07:57 +02:00
35 lines
424 B
Plaintext
35 lines
424 B
Plaintext
# This isn't perfect behavior, but it establishes a baseline and will provide
|
|
# a way to detect behavior changes
|
|
|
|
echo a1
|
|
a[0]= a[1]=; recho "${a[@]:-y}"
|
|
unset a
|
|
|
|
echo a2
|
|
a[1]=; recho "${a[@]:-y}"
|
|
unset a
|
|
|
|
echo a3
|
|
a[0]= a[1]=x; recho "${a[@]:-y}"
|
|
unset a
|
|
|
|
echo a4
|
|
a[0]= a[1]=x; recho ${a[@]:+y}
|
|
unset a
|
|
|
|
echo p1
|
|
set '' ''
|
|
recho "${@:-y}"
|
|
|
|
shift $#
|
|
|
|
echo p2
|
|
set '' x
|
|
recho "${@:-y}"
|
|
|
|
shift $#
|
|
|
|
echo p3
|
|
set '' x
|
|
recho ${@:+y}
|