1 # test the expansion of ${array[@]} and ${array[*]}, both quoted and
2 # unquoted. the expansions should be exactly analogous to the
3 # expansions of $@ and $* quoted and unquoted
8 # If IFS is null, the parameters are joined without separators
12 # If IFS is unset, the parameters are separated by spaces
20 A=(bob 'tom dick harry' joe)
27 A=(bob 'tom dick harry' joe)
34 A=(bob 'tom dick harry' joe)
41 A=(bob 'tom dick harry' joe)
48 # according to POSIX.2, unquoted $* should expand to multiple words if
49 # $IFS is null, just like unquoted $@
51 A=(bob 'tom dick harry' joe)
58 A=(bob 'tom dick harry' joe)
65 A=(bob 'tom dick harry' joe)
72 # if IFS is unset, the individual positional parameters are split on
73 # " \t\n" if $* or $@ are unquoted
75 A=(bob 'tom dick harry' joe)
82 A=(bob 'tom dick harry' joe)
89 # but not for "$@" or "$*"
90 A=(bob 'tom dick harry' joe)
97 A=(bob 'tom dick harry' joe)
104 # these should both expand the value of A to multiple words
110 # this example is straight from the POSIX.2 rationale and adapted to arrays