diff options
author | Denys Vlasenko | 2016-11-04 18:46:14 +0100 |
---|---|---|
committer | Denys Vlasenko | 2016-11-04 18:46:14 +0100 |
commit | 672a55e606fc50e4ffe7810bd0d9cd1cf9b980a3 (patch) | |
tree | dd1805a175268a0e16ba578e095627e90e73f5fb /shell/hush_test/hush-misc | |
parent | 06b114900fc57cac0e422d26228f4d0aaf5d2288 (diff) | |
download | busybox-672a55e606fc50e4ffe7810bd0d9cd1cf9b980a3.zip busybox-672a55e606fc50e4ffe7810bd0d9cd1cf9b980a3.tar.gz |
hush: allow { cmd } to not be terminated by semicolon in some cases
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-misc')
-rw-r--r-- | shell/hush_test/hush-misc/group_in_braces.right | 5 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/group_in_braces.tests | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/group_in_braces.right b/shell/hush_test/hush-misc/group_in_braces.right new file mode 100644 index 0000000..a706449 --- /dev/null +++ b/shell/hush_test/hush-misc/group_in_braces.right @@ -0,0 +1,5 @@ +Zero:0 +Zero:0 +Zero:0 +Zero:0 +Zero:0 diff --git a/shell/hush_test/hush-misc/group_in_braces.tests b/shell/hush_test/hush-misc/group_in_braces.tests new file mode 100755 index 0000000..f6571c3 --- /dev/null +++ b/shell/hush_test/hush-misc/group_in_braces.tests @@ -0,0 +1,11 @@ +# Test cases where { cmd } does not require semicolon after "cmd" +(exit 2); { { true; } } +echo Zero:$? +(exit 2); {(true)} +echo Zero:$? +(exit 2); { true | { true; } } +echo Zero:$? +(exit 2); { while false; do :; done } +echo Zero:$? +(exit 2); { case a in b) ;; esac } +echo Zero:$? |