aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-10 11:06:01 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-10 11:06:01 +0200
commit4f870496e7d934fcbe092478f1da8ec7a3ea4466 (patch)
tree931344dd0d6d1d8cfaf358b1cd6f6e8982101b74 /shell/hush_test
parentd98e5c65c3c69373dab56a7f9af8780c1a8123b2 (diff)
downloadbusybox-w32-4f870496e7d934fcbe092478f1da8ec7a3ea4466.tar.gz
busybox-w32-4f870496e7d934fcbe092478f1da8ec7a3ea4466.tar.bz2
busybox-w32-4f870496e7d934fcbe092478f1da8ec7a3ea4466.zip
hush: do fewer strdups in % and hash expansions
function old new delta builtin_umask 133 132 -1 expand_one_var 1552 1543 -9 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-vars/var_bash6.right5
-rwxr-xr-xshell/hush_test/hush-vars/var_bash6.tests9
2 files changed, 14 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_bash6.right b/shell/hush_test/hush-vars/var_bash6.right
new file mode 100644
index 000000000..63fc23df8
--- /dev/null
+++ b/shell/hush_test/hush-vars/var_bash6.right
@@ -0,0 +1,5 @@
1Expected Actual
2a*z : a*z
3\z : \z
4a1z a2z: a1z a2z
5z : z
diff --git a/shell/hush_test/hush-vars/var_bash6.tests b/shell/hush_test/hush-vars/var_bash6.tests
new file mode 100755
index 000000000..cf2e4f020
--- /dev/null
+++ b/shell/hush_test/hush-vars/var_bash6.tests
@@ -0,0 +1,9 @@
1# This testcase checks globbing correctness in ${v/a/b}
2
3>a1z; >a2z;
4 echo 'Expected' 'Actual'
5v='a bz'; echo 'a*z :' "${v/a*z/a*z}"
6v='a bz'; echo '\z :' "${v/a*z/\z}"
7v='a bz'; echo 'a1z a2z:' ${v/a*z/a*z}
8v='a bz'; echo 'z :' ${v/a*z/\z}
9rm a1z a2z