1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 if [[ $foo = ,* ]]; then echo bad 1; else echo ok 1; fi
19 if [[ $@ = ,* ]]; then echo bad 2; else echo ok 2; fi
20 if [[ $* = ,* ]]; then echo bad 3; else echo ok 3; fi
21 if [[ ${@} = ,* ]]; then echo bad 4; else echo ok 4; fi
22 if [[ ${*} = ,* ]]; then echo bad 5; else echo ok 5; fi
23 if [[ $1 = ,* ]]; then echo bad 6; else echo ok 6; fi
26 if [[ $foo = ,* ]]; then echo bad 7; else echo ok 7; fi
27 if [[ $@ = ,* ]]; then echo bad 8; else echo ok 8; fi
28 if [[ $* = ,* ]]; then echo bad 9; else echo ok 9; fi
29 if [[ ${@} = ,* ]]; then echo bad 10; else echo ok 10; fi
30 if [[ ${*} = ,* ]]; then echo bad 11; else echo ok 11; fi
31 if [[ $1 = ,* ]]; then echo bad 12; else echo ok 12; fi
34 if [[ $@ = ,* ]]; then echo bad 13; else echo ok 13; fi
35 if [[ $* = ,* ]]; then echo bad 14; else echo ok 14; fi
41 if [[ $@ = ,* ]]; then echo bad at 1; else echo ok at 1; fi
42 if [[ ${@} = ,* ]]; then echo bad at 2; else echo ok at 2; fi
44 if [[ $* = ,* ]]; then echo bad star 1; else echo ok star 1; fi
45 if [[ ${*} = ,* ]]; then echo bad star 2; else echo ok star 2; fi
50 # expand_string_for_rhs
66 $foo2) echo ok at 1 ;;
70 # also uses expand_word_leave_quoted
83 $foo2) echo ok star 1 ;;
87 # also uses expand_word_leave_quoted
94 $foo) echo ok star 3 ;;
99 $*) echo ok at-star 1;;
100 *) echo bad at-star 1;;
104 $@) echo ok at-star 2;;
105 *) echo bad at-star 2;;
111 # expand_string_for_rhs
128 if [[ $@ = $foo ]]; then echo ok at 1; else echo bad at 1; fi
129 if [[ $foo = $@ ]]; then echo ok at 2; else echo bad at 2; fi
151 if [[ $@ = $foo ]]; then echo ok at 1; else echo bad at 1; fi
152 if [[ $foo = $@ ]]; then echo ok at 2; else echo bad at 2; fi
187 $foo2) echo ok at 3;;
197 $foo2) echo ok at 5;;
207 $foo2) echo ok at 7;;