diff options
author | Denys Vlasenko | 2009-05-23 16:50:07 +0200 |
---|---|---|
committer | Denys Vlasenko | 2009-05-23 16:50:07 +0200 |
commit | e9bda90e549d1470c7630e1f015b7c1e1560b56b (patch) | |
tree | 171240523541449a1d97562564c2f0037057782d /shell/hush_test | |
parent | 342a63d659ed41b0fe9f412eb75d495e64cc2096 (diff) | |
download | busybox-e9bda90e549d1470c7630e1f015b7c1e1560b56b.zip busybox-e9bda90e549d1470c7630e1f015b7c1e1560b56b.tar.gz |
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.right | 8 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/case1.tests | 15 | ||||
-rw-r--r-- | shell/hush_test/hush-vars/unset.right | 2 |
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 e9e371a..4afb2f5 100644 --- a/shell/hush_test/hush-misc/case1.right +++ b/shell/hush_test/hush-misc/case1.right @@ -12,3 +12,11 @@ OK_44 OK_51 OK_52 OK_53 +OK_sub1 +OK_sub2 +OK_sub3 +OK_sub4 +OK_sub5 +OK_sub6 +OK_esac1 +Done diff --git a/shell/hush_test/hush-misc/case1.tests b/shell/hush_test/hush-misc/case1.tests index b2c96cc..d72b57f 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; case w in `echo OK_52 >&2`) echo SKIP;; `echo`w) echo OK_53;; esac; # parsing cases in subshells can easily get messy - case m in m) echo ok-sub1;; esac - case m in (m) echo ok-sub2;; esac -(case m in m) echo ok-sub3;; esac) -(case m in (m) echo ok-sub4;; esac) + case m in m) echo OK_sub1;; esac + case m in (m) echo OK_sub2;; esac +(case m in m) echo OK_sub3;; esac) +(case m in (m) echo OK_sub4;; esac) ( - case m in m) echo ok-sub5;; esac + case m in m) echo OK_sub5;; esac ) ( - case m in (m) echo ok-sub6;; esac + case m in (m) echo OK_sub6;; esac ) +(case esac in "esac") echo OK_esac1;; esac) + +echo Done diff --git a/shell/hush_test/hush-vars/unset.right b/shell/hush_test/hush-vars/unset.right index 0da0e57..1fbe76a 100644 --- a/shell/hush_test/hush-vars/unset.right +++ b/shell/hush_test/hush-vars/unset.right @@ -1,5 +1,5 @@ 0 -unset: invalid option -- 'm' +unset: invalid option -- m 1 0 ___ |