From ee553b929c81ae0051abfd54984aa0537f767d89 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 15 Jul 2017 22:51:55 +0200 Subject: hush: fix and_or_and_backgrounding.tests failure function old new delta done_pipe 133 218 +85 Signed-off-by: Denys Vlasenko --- .../hush-bugs/and_or_and_backgrounding.right | 4 --- .../hush-bugs/and_or_and_backgrounding.tests | 31 ---------------------- .../hush-parsing/and_or_and_backgrounding.right | 4 +++ .../hush-parsing/and_or_and_backgrounding.tests | 31 ++++++++++++++++++++++ 4 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 shell/hush_test/hush-bugs/and_or_and_backgrounding.right delete mode 100755 shell/hush_test/hush-bugs/and_or_and_backgrounding.tests create mode 100644 shell/hush_test/hush-parsing/and_or_and_backgrounding.right create mode 100755 shell/hush_test/hush-parsing/and_or_and_backgrounding.tests (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-bugs/and_or_and_backgrounding.right b/shell/hush_test/hush-bugs/and_or_and_backgrounding.right deleted file mode 100644 index 90ce63e..0000000 --- a/shell/hush_test/hush-bugs/and_or_and_backgrounding.right +++ /dev/null @@ -1,4 +0,0 @@ -First -Second -Third -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 deleted file mode 100755 index 05acfb8..0000000 --- a/shell/hush_test/hush-bugs/and_or_and_backgrounding.tests +++ /dev/null @@ -1,31 +0,0 @@ -# UNFIXED BUG: hush thinks that ; && || & have the same precedence. -# According to this doc, && || have higher precedence than ; &. -# See example below. -# Precedence of ; is not a problem in practice. Precedence of & is. -# -#http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html -# -#2.9.3 Lists -# -#An AND-OR list is a sequence of one or more pipelines separated by -#the operators "&&" and "||" . -# -#A list is a sequence of one or more AND-OR lists separated by the operators -#';' and '&' and optionally terminated by ';', '&', or . -# -#The operators "&&" and "||" shall have equal precedence and shall be -#evaluated with left associativity. For example, both of the following -#commands write solely bar to standard output: -# -# false && echo foo || echo bar -# true || echo foo && echo bar -# -#A ';' or terminator shall cause the preceding AND-OR list -#to be executed sequentially; an '&' shall cause asynchronous execution -#of the preceding AND-OR list. - -echo First && sleep 0.2 && echo Third & -sleep 0.1 -echo Second -wait -echo Done diff --git a/shell/hush_test/hush-parsing/and_or_and_backgrounding.right b/shell/hush_test/hush-parsing/and_or_and_backgrounding.right new file mode 100644 index 0000000..90ce63e --- /dev/null +++ b/shell/hush_test/hush-parsing/and_or_and_backgrounding.right @@ -0,0 +1,4 @@ +First +Second +Third +Done diff --git a/shell/hush_test/hush-parsing/and_or_and_backgrounding.tests b/shell/hush_test/hush-parsing/and_or_and_backgrounding.tests new file mode 100755 index 0000000..05acfb8 --- /dev/null +++ b/shell/hush_test/hush-parsing/and_or_and_backgrounding.tests @@ -0,0 +1,31 @@ +# UNFIXED BUG: hush thinks that ; && || & have the same precedence. +# According to this doc, && || have higher precedence than ; &. +# See example below. +# Precedence of ; is not a problem in practice. Precedence of & is. +# +#http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html +# +#2.9.3 Lists +# +#An AND-OR list is a sequence of one or more pipelines separated by +#the operators "&&" and "||" . +# +#A list is a sequence of one or more AND-OR lists separated by the operators +#';' and '&' and optionally terminated by ';', '&', or . +# +#The operators "&&" and "||" shall have equal precedence and shall be +#evaluated with left associativity. For example, both of the following +#commands write solely bar to standard output: +# +# false && echo foo || echo bar +# true || echo foo && echo bar +# +#A ';' or terminator shall cause the preceding AND-OR list +#to be executed sequentially; an '&' shall cause asynchronous execution +#of the preceding AND-OR list. + +echo First && sleep 0.2 && echo Third & +sleep 0.1 +echo Second +wait +echo Done -- cgit v1.1