Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame^] | 1 | # place holder for future alias testing |
| 2 | #ash# shopt -s expand_aliases |
| 3 | |
| 4 | # alias/unalias tests originally in builtins.tests |
| 5 | |
| 6 | unalias -a |
| 7 | # this should return success, according to POSIX.2 |
| 8 | alias |
| 9 | echo alias: $? |
| 10 | alias foo=bar |
| 11 | unalias foo |
| 12 | # this had better return success, according to POSIX.2 |
| 13 | alias |
| 14 | echo alias: $? |
| 15 | |
| 16 | # bug in all versions through bash-2.05b |
| 17 | |
| 18 | unalias qfoo qbar qbaz quux 2>/dev/null |
| 19 | |
| 20 | alias qfoo=qbar |
| 21 | alias qbar=qbaz |
| 22 | alias qbaz=quux |
| 23 | alias quux=qfoo |
| 24 | |
| 25 | qfoo |
| 26 | |
| 27 | unalias qfoo qbar qbaz quux |
| 28 | |
| 29 | unalias -a |
| 30 | |
| 31 | alias foo='echo ' |
| 32 | alias bar=baz |
| 33 | alias baz=quux |
| 34 | |
| 35 | foo bar |
| 36 | |
| 37 | unalias foo bar baz |