diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-10 12:03:20 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-10 12:03:20 +0000 |
commit | 1fd1ea4395e520694bd9f8b1dc9e60af6442946d (patch) | |
tree | ffe931a1e9254789ac119321f88b17767176c73c /shell/hush_test/hush-bugs | |
parent | 551bdfecb7cfb4df0f127d34884e0a9502324acd (diff) | |
download | busybox-w32-1fd1ea4395e520694bd9f8b1dc9e60af6442946d.tar.gz busybox-w32-1fd1ea4395e520694bd9f8b1dc9e60af6442946d.tar.bz2 busybox-w32-1fd1ea4395e520694bd9f8b1dc9e60af6442946d.zip |
hush: tighten up "for" variable name check.
Add TODOs.
Disable redir4.right part where we differ from bash.
It is not a bug per standards.
Add a few tests, one is in hush-bugs section:
and_or_and_backgrounding.right. It will likely bite users
in real world usage.
Diffstat (limited to 'shell/hush_test/hush-bugs')
-rw-r--r-- | shell/hush_test/hush-bugs/and_or_and_backgrounding.right | 4 | ||||
-rwxr-xr-x | shell/hush_test/hush-bugs/and_or_and_backgrounding.tests | 31 |
2 files changed, 35 insertions, 0 deletions
diff --git a/shell/hush_test/hush-bugs/and_or_and_backgrounding.right b/shell/hush_test/hush-bugs/and_or_and_backgrounding.right new file mode 100644 index 000000000..90ce63e01 --- /dev/null +++ b/shell/hush_test/hush-bugs/and_or_and_backgrounding.right | |||
@@ -0,0 +1,4 @@ | |||
1 | First | ||
2 | Second | ||
3 | Third | ||
4 | Done | ||
diff --git a/shell/hush_test/hush-bugs/and_or_and_backgrounding.tests b/shell/hush_test/hush-bugs/and_or_and_backgrounding.tests new file mode 100755 index 000000000..05acfb863 --- /dev/null +++ b/shell/hush_test/hush-bugs/and_or_and_backgrounding.tests | |||
@@ -0,0 +1,31 @@ | |||
1 | # UNFIXED BUG: hush thinks that ; && || & have the same precedence. | ||
2 | # According to this doc, && || have higher precedence than ; &. | ||
3 | # See example below. | ||
4 | # Precedence of ; is not a problem in practice. Precedence of & is. | ||
5 | # | ||
6 | #http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html | ||
7 | # | ||
8 | #2.9.3 Lists | ||
9 | # | ||
10 | #An AND-OR list is a sequence of one or more pipelines separated by | ||
11 | #the operators "&&" and "||" . | ||
12 | # | ||
13 | #A list is a sequence of one or more AND-OR lists separated by the operators | ||
14 | #';' and '&' and optionally terminated by ';', '&', or <newline>. | ||
15 | # | ||
16 | #The operators "&&" and "||" shall have equal precedence and shall be | ||
17 | #evaluated with left associativity. For example, both of the following | ||
18 | #commands write solely bar to standard output: | ||
19 | # | ||
20 | # false && echo foo || echo bar | ||
21 | # true || echo foo && echo bar | ||
22 | # | ||
23 | #A ';' or <newline> terminator shall cause the preceding AND-OR list | ||
24 | #to be executed sequentially; an '&' shall cause asynchronous execution | ||
25 | #of the preceding AND-OR list. | ||
26 | |||
27 | echo First && sleep 0.2 && echo Third & | ||
28 | sleep 0.1 | ||
29 | echo Second | ||
30 | wait | ||
31 | echo Done | ||