summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-alias
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-05 00:27:50 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-05 00:27:50 +0000
commit1c660b4bd2c303fcb829bc93143fc454693afab4 (patch)
tree5b2f2c8676d13bc132fdac4506049facd3475235 /shell/ash_test/ash-alias
parent3af3e5b4b0d12dffbe7bd144092f8cb140ff74a4 (diff)
downloadbusybox-w32-1c660b4bd2c303fcb829bc93143fc454693afab4.tar.gz
busybox-w32-1c660b4bd2c303fcb829bc93143fc454693afab4.tar.bz2
busybox-w32-1c660b4bd2c303fcb829bc93143fc454693afab4.zip
small ash testsuite, adapted from bash
(only a small part of it, actually)
Diffstat (limited to 'shell/ash_test/ash-alias')
-rw-r--r--shell/ash_test/ash-alias/alias.right4
-rwxr-xr-xshell/ash_test/ash-alias/alias.tests37
2 files changed, 41 insertions, 0 deletions
diff --git a/shell/ash_test/ash-alias/alias.right b/shell/ash_test/ash-alias/alias.right
new file mode 100644
index 000000000..0667b2187
--- /dev/null
+++ b/shell/ash_test/ash-alias/alias.right
@@ -0,0 +1,4 @@
1alias: 0
2alias: 0
3./alias.tests: line 25: qfoo: not found
4quux
diff --git a/shell/ash_test/ash-alias/alias.tests b/shell/ash_test/ash-alias/alias.tests
new file mode 100755
index 000000000..8d07b0b28
--- /dev/null
+++ b/shell/ash_test/ash-alias/alias.tests
@@ -0,0 +1,37 @@
1# place holder for future alias testing
2#ash# shopt -s expand_aliases
3
4# alias/unalias tests originally in builtins.tests
5
6unalias -a
7# this should return success, according to POSIX.2
8alias
9echo alias: $?
10alias foo=bar
11unalias foo
12# this had better return success, according to POSIX.2
13alias
14echo alias: $?
15
16# bug in all versions through bash-2.05b
17
18unalias qfoo qbar qbaz quux 2>/dev/null
19
20alias qfoo=qbar
21alias qbar=qbaz
22alias qbaz=quux
23alias quux=qfoo
24
25qfoo
26
27unalias qfoo qbar qbaz quux
28
29unalias -a
30
31alias foo='echo '
32alias bar=baz
33alias baz=quux
34
35foo bar
36
37unalias foo bar baz