diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-15 22:51:55 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-15 22:51:55 +0200 |
commit | ee553b929c81ae0051abfd54984aa0537f767d89 (patch) | |
tree | 3782b6d025493e7742012ba0dfaca07c11d85c20 /shell/ash_test | |
parent | 2c8929c7af5c5618d5f2ed59053c53bac2304184 (diff) | |
download | busybox-w32-ee553b929c81ae0051abfd54984aa0537f767d89.tar.gz busybox-w32-ee553b929c81ae0051abfd54984aa0537f767d89.tar.bz2 busybox-w32-ee553b929c81ae0051abfd54984aa0537f767d89.zip |
hush: fix and_or_and_backgrounding.tests failure
function old new delta
done_pipe 133 218 +85
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-parsing/and_or_and_backgrounding.right | 4 | ||||
-rwxr-xr-x | shell/ash_test/ash-parsing/and_or_and_backgrounding.tests | 31 |
2 files changed, 35 insertions, 0 deletions
diff --git a/shell/ash_test/ash-parsing/and_or_and_backgrounding.right b/shell/ash_test/ash-parsing/and_or_and_backgrounding.right new file mode 100644 index 000000000..90ce63e01 --- /dev/null +++ b/shell/ash_test/ash-parsing/and_or_and_backgrounding.right | |||
@@ -0,0 +1,4 @@ | |||
1 | First | ||
2 | Second | ||
3 | Third | ||
4 | Done | ||
diff --git a/shell/ash_test/ash-parsing/and_or_and_backgrounding.tests b/shell/ash_test/ash-parsing/and_or_and_backgrounding.tests new file mode 100755 index 000000000..05acfb863 --- /dev/null +++ b/shell/ash_test/ash-parsing/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 | ||