]>
Commit | Line | Data |
---|---|---|
8868edaf CR |
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. | |
5 | # | |
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. | |
10 | # | |
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/>. | |
13 | # | |
b80f6443 JA |
14 | # place holder for future alias testing |
15 | shopt -s expand_aliases | |
16 | ||
17 | # alias/unalias tests originally in builtins.tests | |
18 | ||
19 | unalias -a | |
20 | # this should return success, according to POSIX.2 | |
21 | alias | |
22 | echo alias: $? | |
23 | alias foo=bar | |
24 | unalias foo | |
25 | # this had better return success, according to POSIX.2 | |
26 | alias | |
27 | echo alias: $? | |
28 | ||
29 | # bug in all versions through bash-2.05b | |
30 | ||
31 | unalias qfoo qbar qbaz quux 2>/dev/null | |
32 | ||
33 | alias qfoo=qbar | |
34 | alias qbar=qbaz | |
35 | alias qbaz=quux | |
36 | alias quux=qfoo | |
37 | ||
38 | qfoo | |
39 | ||
40 | unalias qfoo qbar qbaz quux | |
41 | ||
42 | unalias -a | |
43 | ||
44 | alias foo='echo ' | |
45 | alias bar=baz | |
46 | alias baz=quux | |
47 | ||
48 | foo bar | |
49 | ||
50 | unalias foo bar baz | |
0001803f | 51 | |
74091dd4 CR |
52 | # post bash-5.1 problems with compound array assignment during multiline |
53 | # alias expansion | |
54 | alias foo='a=() b="" | |
55 | for i in 1; do echo hi; done' | |
56 | foo | |
57 | ||
58 | unalias foo | |
59 | ||
0001803f | 60 | ${THIS_SH} ./alias1.sub |
a0c0a00f | 61 | ${THIS_SH} ./alias2.sub |
d233b485 CR |
62 | ${THIS_SH} ./alias3.sub |
63 | ${THIS_SH} ./alias4.sub | |
8868edaf | 64 | ${THIS_SH} ./alias5.sub |
74091dd4 | 65 | ${THIS_SH} ./alias6.sub |