summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-05-23 16:50:07 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-05-23 16:50:07 +0200
commite9bda90e549d1470c7630e1f015b7c1e1560b56b (patch)
tree171240523541449a1d97562564c2f0037057782d /shell/hush_test
parent342a63d659ed41b0fe9f412eb75d495e64cc2096 (diff)
downloadbusybox-w32-e9bda90e549d1470c7630e1f015b7c1e1560b56b.tar.gz
busybox-w32-e9bda90e549d1470c7630e1f015b7c1e1560b56b.tar.bz2
busybox-w32-e9bda90e549d1470c7630e1f015b7c1e1560b56b.zip
hush: fix problems with case in subshells and with "case esac"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/case1.right8
-rwxr-xr-xshell/hush_test/hush-misc/case1.tests15
-rw-r--r--shell/hush_test/hush-vars/unset.right2
3 files changed, 18 insertions, 7 deletions
diff --git a/shell/hush_test/hush-misc/case1.right b/shell/hush_test/hush-misc/case1.right
index e9e371ac0..4afb2f51c 100644
--- a/shell/hush_test/hush-misc/case1.right
+++ b/shell/hush_test/hush-misc/case1.right
@@ -12,3 +12,11 @@ OK_44
12OK_51 12OK_51
13OK_52 13OK_52
14OK_53 14OK_53
15OK_sub1
16OK_sub2
17OK_sub3
18OK_sub4
19OK_sub5
20OK_sub6
21OK_esac1
22Done
diff --git a/shell/hush_test/hush-misc/case1.tests b/shell/hush_test/hush-misc/case1.tests
index b2c96ccf8..d72b57f53 100755
--- a/shell/hush_test/hush-misc/case1.tests
+++ b/shell/hush_test/hush-misc/case1.tests
@@ -25,13 +25,16 @@ case w in `echo w`) echo OK_51;; `echo WRONG >&2`w) echo WRONG;; esac;
25case w in `echo OK_52 >&2`) echo SKIP;; `echo`w) echo OK_53;; esac; 25case w in `echo OK_52 >&2`) echo SKIP;; `echo`w) echo OK_53;; esac;
26 26
27# parsing cases in subshells can easily get messy 27# parsing cases in subshells can easily get messy
28 case m in m) echo ok-sub1;; esac 28 case m in m) echo OK_sub1;; esac
29 case m in (m) echo ok-sub2;; esac 29 case m in (m) echo OK_sub2;; esac
30(case m in m) echo ok-sub3;; esac) 30(case m in m) echo OK_sub3;; esac)
31(case m in (m) echo ok-sub4;; esac) 31(case m in (m) echo OK_sub4;; esac)
32( 32(
33 case m in m) echo ok-sub5;; esac 33 case m in m) echo OK_sub5;; esac
34) 34)
35( 35(
36 case m in (m) echo ok-sub6;; esac 36 case m in (m) echo OK_sub6;; esac
37) 37)
38(case esac in "esac") echo OK_esac1;; esac)
39
40echo Done
diff --git a/shell/hush_test/hush-vars/unset.right b/shell/hush_test/hush-vars/unset.right
index 0da0e5736..1fbe76a73 100644
--- a/shell/hush_test/hush-vars/unset.right
+++ b/shell/hush_test/hush-vars/unset.right
@@ -1,5 +1,5 @@
10 10
2unset: invalid option -- 'm' 2unset: invalid option -- m
31 31
40 40
5___ 5___