Results for loop.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 23232321232416151529
ok 2202100000
N-I 0201000000
BUG-2 0203100000
BUG 4002400000
FAIL 0060051214110
TIME 0000001030
total29292929292929292929
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass pass pass pass FAIL pass pass pass implicit for loop
details
1pass pass pass pass pass pass FAIL pass FAIL pass empty for loop (has "in")
detailsdetails
2ok pass pass BUG ok FAIL pass FAIL FAIL pass for loop with invalid identifier
detailsdetailsdetailsdetailsdetailsdetails
3pass pass pass pass pass pass pass pass pass pass the word 'in' can be the loop variable
4pass pass pass pass pass pass pass pass pass pass Tilde expansion within for loop
5pass N-I FAIL pass pass pass pass pass pass pass Brace Expansion within Array
detailsdetails
6pass pass pass pass pass pass pass pass pass pass using loop var outside loop
7pass pass pass pass pass pass pass FAIL pass pass continue
details
8pass pass pass pass pass pass pass pass pass pass break
9pass pass pass pass pass pass pass pass pass pass while in while condition
10pass pass pass pass pass pass pass pass pass pass while in pipe
11pass pass pass pass pass pass FAIL pass pass pass while in pipe with subshell
details
12pass pass pass pass pass pass pass FAIL pass pass until loop
details
13pass pass pass ok pass pass pass pass FAIL pass continue at top level
detailsdetails
14BUG ok FAIL ok BUG FAIL FAIL FAIL FAIL pass continue in subshell
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
15BUG BUG-2 FAIL BUG-2 BUG FAIL FAIL FAIL FAIL pass continue in subshell aborts with errexit
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
16ok ok FAIL pass pass pass TIME FAIL TIME pass bad arg to break
detailsdetailsdetailsdetailsdetailsdetails
17BUG BUG-2 FAIL BUG-2 BUG-2 FAIL FAIL FAIL FAIL pass too many args to continue
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
18pass pass pass pass pass pass pass pass TIME pass break in condition of loop
19pass pass pass pass pass pass FAIL pass TIME pass break in condition of nested loop
detailsdetails
20pass pass pass pass pass pass FAIL pass FAIL pass return within eval
detailsdetails
21pass pass pass pass BUG pass FAIL FAIL FAIL pass break/continue within eval
detailsdetailsdetailsdetails
22pass pass pass BUG BUG FAIL FAIL FAIL FAIL pass break/continue within source
detailsdetailsdetailsdetailsdetailsdetails
23BUG pass pass BUG-2 pass pass FAIL FAIL FAIL pass top-level break/continue/return (without strict_control_flow)
detailsdetailsdetailsdetailsdetails
24pass pass pass pass pass pass pass pass pass pass multi-level break with argument
25pass pass pass pass pass pass pass FAIL pass pass multi-level continue
details
26pass pass pass pass pass pass pass FAIL pass pass $b break, $c continue, $r return, $e exit
details
27pass pass pass pass pass pass pass FAIL pass pass \break \continue \return \exit
details
28pass N-I FAIL N-I pass pass FAIL FAIL FAIL pass builtin,command break,continue,return,exit
detailsdetailsdetailsdetailsdetailsdetails
212 passed, 7 OK, 3 not implemented, 16 BUG, 48 failed, 4 timeouts, 0 cases skipped

Details on runs that didn't PASS

toysh0 implicit for loop

[toysh stdout] Expected '1\n2\n3\nfinished=3\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: ;
toysh1 empty for loop (has "in")

[toysh status] Expected 0, got 1

stdout:
stderr: 
set: bad --
brush1 empty for loop (has "in")

[brush stdout] Expected '', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
bash2 for loop with invalid identifier

stdout:
stderr: 
bash: line 3: `-': not a valid identifier
zsh2 for loop with invalid identifier

stdout:
hi
stderr:
zsh: parse error near `-'
zsh: parse error near `done'
mksh2 for loop with invalid identifier

stdout:
stderr: 
mksh: <stdin>[1]: for: bad identifier
ksh2 for loop with invalid identifier

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: for: bad identifier
sush2 for loop with invalid identifier

[sush stdout] Expected u'', got 'hi\n'

stdout:
hi
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: -
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: done

brush2 for loop with invalid identifier

[brush stdout] Expected u'', got 'hi\nhi\nhi\n'
[brush status] Expected 2, got 0

stdout:
hi
hi
hi
stderr:
dash5 Brace Expansion within Array

stdout:
-{a,b}
{c,d}-
stderr:
ash5 Brace Expansion within Array

[ash stdout] Expected '-a\n-b\nc-\nd-\n', got '-{a,b}\n{c,d}-\n'

stdout:
-{a,b}
{c,d}-
stderr:
sush7 continue

[sush stdout] Expected 'a\na\nb\nc\nc\n', got 'a\na\nb\n'

stdout:
a
a
b
stderr:
toysh11 while in pipe with subshell

[toysh stdout] Expected '3\n', got '0\n'
[toysh status] Expected 0, got 127

stdout:
0
stderr:
sh: read: No such file or directory
sh: 1: No such file or directory
sh: 2: No such file or directory
sh: 3: No such file or directory
sush12 until loop

[sush status] Expected 0, got 2

stdout:
hi
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: do

sush: break: only meaningful in a `for', `while', or `until' loop
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: Unexpected token: done

zsh13 continue at top level

stdout:
one
stderr:
continue: not in while, until, select, or repeat loop
brush13 continue at top level

[brush stdout] Expected 'one\ntwo\n', got 'one\n'

stdout:
one
stderr:
bash14 continue in subshell

stdout:
> 1
Should not print
subshell status=0
. 1
> 2
Should not print
subshell status=0
. 2
stderr:
bash: line 3: continue: only meaningful in a `for', `while', or `until' loop
bash: line 3: continue: only meaningful in a `for', `while', or `until' loop
dash14 continue in subshell

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
ash14 continue in subshell

[ash stdout] Expected '> 1\nsubshell status=1\n. 1\n> 2\nsubshell status=1\n. 2\n' Got '> 1\nsubshell status=0\n. 1\n> 2\nsubshell status=0\n. 2\n'

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
zsh14 continue in subshell

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
mksh14 continue in subshell

stdout:
> 1
Should not print
subshell status=0
. 1
> 2
Should not print
subshell status=0
. 2
stderr:
mksh: <stdin>[6]: continue: can't continue
mksh: <stdin>[6]: continue: can't continue
ksh14 continue in subshell

[ksh stdout] Expected '> 1\nsubshell status=1\n. 1\n> 2\nsubshell status=1\n. 2\n' Got '> 1\nShould not print\nsubshell status=0\n. 1\n> 2\nShould not print\nsubshell status=0\n. 2\n'

stdout:
> 1
Should not print
subshell status=0
. 1
> 2
Should not print
subshell status=0
. 2
stderr:
W: ksh: <stdin>[6]: continue: can't continue
W: ksh: <stdin>[6]: continue: can't continue
toysh14 continue in subshell

[toysh stdout] Expected '> 1\nsubshell status=1\n. 1\n> 2\nsubshell status=1\n. 2\n' Got '> 1\nsubshell status=139\n. 1\n> 2\nsubshell status=139\n. 2\n'

stdout:
> 1
subshell status=139
. 1
> 2
subshell status=139
. 2
stderr:
sush14 continue in subshell

[sush stdout] Expected '> 1\nsubshell status=1\n. 1\n> 2\nsubshell status=1\n. 2\n' Got '> 1\nsubshell status=0\n. 1\n> 2\nsubshell status=0\n. 2\n'

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
brush14 continue in subshell

[brush stdout] Expected '> 1\nsubshell status=1\n. 1\n> 2\nsubshell status=1\n. 2\n' Got '> 1\nsubshell status=0\n. 1\n> 2\nsubshell status=0\n. 2\n'

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
bash15 continue in subshell aborts with errexit

stdout:
> 1
Should not print
should fail after subshell
. 1
> 2
Should not print
should fail after subshell
. 2
stderr:
bash: line 4: continue: only meaningful in a `for', `while', or `until' loop
bash: line 4: continue: only meaningful in a `for', `while', or `until' loop
dash15 continue in subshell aborts with errexit

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
ash15 continue in subshell aborts with errexit

[ash stdout] Expected '> 1\n', got '> 1\nshould fail after subshell\n. 1\n> 2\nshould fail after subshell\n. 2\n'
[ash status] Expected 1, got 0

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
zsh15 continue in subshell aborts with errexit

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
mksh15 continue in subshell aborts with errexit

stdout:
> 1
Should not print
should fail after subshell
. 1
> 2
Should not print
should fail after subshell
. 2
stderr:
mksh: <stdin>[7]: continue: can't continue
mksh: <stdin>[7]: continue: can't continue
ksh15 continue in subshell aborts with errexit

[ksh stdout] Expected '> 1\n', got '> 1\nShould not print\nshould fail after subshell\n. 1\n> 2\nShould not print\nshould fail after subshell\n. 2\n'
[ksh status] Expected 1, got 0

stdout:
> 1
Should not print
should fail after subshell
. 1
> 2
Should not print
should fail after subshell
. 2
stderr:
W: ksh: <stdin>[7]: continue: can't continue
W: ksh: <stdin>[7]: continue: can't continue
toysh15 continue in subshell aborts with errexit

[toysh stdout] Expected '> 1\n', got '> 1\nshould fail after subshell\n. 1\n> 2\nshould fail after subshell\n. 2\n'
[toysh status] Expected 1, got 0

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
set: bad -o errexit
sush15 continue in subshell aborts with errexit

[sush stdout] Expected '> 1\n', got '> 1\nshould fail after subshell\n. 1\n> 2\nshould fail after subshell\n. 2\n'
[sush status] Expected 1, got 0

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
brush15 continue in subshell aborts with errexit

[brush stdout] Expected '> 1\n', got '> 1\nshould fail after subshell\n. 1\n> 2\nshould fail after subshell\n. 2\n'
[brush status] Expected 1, got 0

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
bash16 bad arg to break

stdout:
hi
stderr:
bash: line 4: break: oops: numeric argument required
dash16 bad arg to break

stdout:
hi
stderr:
dash: 4: break: Illegal number: oops
ash16 bad arg to break

[ash status] Expected 1, got 2

stdout:
hi
stderr:
ash: break: line 4: Illegal number: oops
sush16 bad arg to break

[sush status] Expected 1, got 128

stdout:
hi
stderr:
sush: break: oops: numeric argument required
bash17 too many args to continue

stdout:
a
--
stderr:
bash: line 3: continue: too many arguments
dash17 too many args to continue

stdout:
a
b
c
--
stderr:
ash17 too many args to continue

[ash stdout] Expected u'', got 'a\nb\nc\n--\n'
[ash status] Expected 2, got 0

stdout:
a
b
c
--
stderr:
zsh17 too many args to continue

stdout:
a
b
c
--
stderr:
continue: too many arguments
continue: too many arguments
continue: too many arguments
mksh17 too many args to continue

stdout:
a
b
c
--
stderr:
ksh17 too many args to continue

[ksh stdout] Expected u'', got 'a\nb\nc\n--\n'
[ksh status] Expected 2, got 0

stdout:
a
b
c
--
stderr:
toysh17 too many args to continue

[toysh stdout] Expected u'', got 'a\nb\nc\n\n'
[toysh status] Expected 2, got 0

stdout:
a
b
c

stderr:
continue: Max 1 argument (see "continue --help")
continue: Max 1 argument (see "continue --help")
continue: Max 1 argument (see "continue --help")
sush17 too many args to continue

[sush stdout] Expected u'', got 'a\nc\n'
[sush status] Expected 2, got 0

stdout:
a
c
stderr:
brush17 too many args to continue

[brush stdout] Expected u'', got 'a\nb\nc\n--\n'
[brush status] Expected 2, got 0

stdout:
a
b
c
--
stderr:
error: unexpected argument '2' found

Usage: continue [WHICH_LOOP]

For more information, try '--help'.

error: unexpected argument '2' found

Usage: continue [WHICH_LOOP]

For more information, try '--help'.

error: unexpected argument '2' found

Usage: continue [WHICH_LOOP]

For more information, try '--help'.

toysh19 break in condition of nested loop

[toysh stdout] Expected 'i=1\ni=2\ni=3\ndone\n', got 'i=1\ndone\n'

stdout:
i=1
done
stderr:
toysh20 return within eval

[toysh stdout] Expected 'one\n', got 'one\ntwo\n'

stdout:
one
two
stderr:
brush20 return within eval

[brush stdout] Expected 'one\n', got 'one\ntwo\n'

stdout:
one
two
stderr:
mksh21 break/continue within eval

stdout:
1
2
3
4
5
stderr:
mksh: continue: can't continue
mksh: break: can't break
toysh21 break/continue within eval

[toysh stdout] Expected '1\n3\n', got '1\n'
[toysh status] Expected 0, got -11

stdout:
1
stderr:
sush21 break/continue within eval

[sush stdout] Expected '1\n3\n', got '1\n'

stdout:
1
stderr:
brush21 break/continue within eval

[brush stdout] Expected '1\n3\n', got '1\n2\n3\n4\n5\ndone\n'

stdout:
1
2
3
4
5
done
stderr:
zsh22 break/continue within source

stdout:
1
2
3
4
5
done
stderr:
spec/testdata/continue.sh:continue:1: not in while, until, select, or repeat loop
spec/testdata/break.sh:break:1: not in while, until, select, or repeat loop
mksh22 break/continue within source

stdout:
1
2
3
4
5
done
stderr:
mksh: spec/testdata/continue.sh[1]: continue: can't continue
mksh: spec/testdata/break.sh[1]: break: can't break
ksh22 break/continue within source

[ksh stdout] Expected '1\n3\ndone\n', got '1\n2\n3\n4\n5\ndone\n'

stdout:
1
2
3
4
5
done
stderr:
W: ksh: spec/testdata/continue.sh[1]: continue: can't continue
W: ksh: spec/testdata/break.sh[1]: break: can't break
toysh22 break/continue within source

[toysh stdout] Expected '1\n3\ndone\n', got '1\n'
[toysh status] Expected 0, got -11

stdout:
1
stderr:
sush22 break/continue within source

[sush stdout] Expected '1\n3\ndone\n', got '1\ndone\n'

stdout:
1
done
stderr:
brush22 break/continue within source

[brush stdout] Expected '1\n3\ndone\n', got '1\n2\n3\n4\n5\ndone\n'

stdout:
1
2
3
4
5
done
stderr:
bash23 top-level break/continue/return (without strict_control_flow)

stdout:
break=0
continue=0
return=2
stderr:
bash: line 1: break: only meaningful in a `for', `while', or `until' loop
bash: line 1: continue: only meaningful in a `for', `while', or `until' loop
bash: line 1: return: can only `return' from a function or sourced script
zsh23 top-level break/continue/return (without strict_control_flow)

stdout:
stderr: 
zsh:break:1: not in while, until, select, or repeat loop
zsh:continue:1: not in while, until, select, or repeat loop
toysh23 top-level break/continue/return (without strict_control_flow)

[toysh stdout] Expected 'break=0\ncontinue=0\n', got 'break=1\ncontinue=1\n'

stdout:
break=1
continue=1
stderr:
break: need for/while/until
continue: need for/while/until
sush23 top-level break/continue/return (without strict_control_flow)

[sush stdout] Expected 'break=0\ncontinue=0\n', got 'break=0\ncontinue=0\nreturn=2\n'

stdout:
break=0
continue=0
return=2
stderr:
sush: break: only meaningful in a `for', `while', or `until' loop
sush: continue: only meaningful in a `for', `while', or `until' loop
sush: return: can only `return' from a function or sourced script
brush23 top-level break/continue/return (without strict_control_flow)

[brush stdout] Expected 'break=0\ncontinue=0\n', got 'return=2\n'

stdout:
return=2
stderr:
return: can only be used in a function or sourced script
sush25 multi-level continue

[sush stdout] Expected '1 a\n1 c\n2 a\n2 c\n---\n1 a\n2 a\n', got '1 a\n2 a\n---\n1 a\n'

stdout:
1 a
2 a
---
1 a
stderr:
sush26 $b break, $c continue, $r return, $e exit

[sush stdout] Expected '- break\n1\n- continue\n1\n3\n- return\n1\n2\nstatus=99\n- exit\n' Got '- break\n1\n- continue\n1\n- return\n1\n2\nstatus=99\n- exit\n'

stdout:
- break
1
- continue
1
- return
1
2
status=99
- exit
stderr:
sush27 \break \continue \return \exit

[sush stdout] Expected '- break\n1\n- continue\n1\n3\n- return\n1\n2\nstatus=99\n- exit\n' Got '- break\n1\n- continue\n1\n- return\n1\n2\nstatus=99\n- exit\n'

stdout:
- break
1
- continue
1
- return
1
2
status=99
- exit
stderr:
dash28 builtin,command break,continue,return,exit

stdout:
stderr: 
ash28 builtin,command break,continue,return,exit

[ash stdout] Expected '- break\n1\n- continue\n1\n3\n- return\n1\n2\nstatus=99\n- exit\n' Got '- break\n1\n2\n3\n- continue\n1\n3\n- return\n1\n2\n3\nstatus=0\n- exit\nnot executed\n'
[ash status] Expected 5, got 0

stdout:
- break
1
2
3
- continue
1
3
- return
1
2
3
status=0
- exit
not executed
stderr:
ash: builtin: not found
ash: builtin: not found
ash: builtin: not found
ash: builtin: not found
ash: builtin: not found
zsh28 builtin,command break,continue,return,exit

stdout:
stderr: 
toysh28 builtin,command break,continue,return,exit

[toysh stdout] Expected '- break\n1\n- continue\n1\n3\n- return\n1\n2\nstatus=99\n- exit\n' Got ''
[toysh status] Expected 5, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush28 builtin,command break,continue,return,exit

[sush stdout] Expected '- break\n1\n- continue\n1\n3\n- return\n1\n2\nstatus=99\n- exit\n' Got '- break\n1\n- continue\n1\n- return\n1\n2\nstatus=99\n- exit\n'

stdout:
- break
1
- continue
1
- return
1
2
status=99
- exit
stderr:
brush28 builtin,command break,continue,return,exit

[brush stdout] Expected '- break\n1\n- continue\n1\n3\n- return\n1\n2\nstatus=99\n- exit\n' Got '- break\n1\n- continue\n1\n'
[brush status] Expected 5, got -6

stdout:
- break
1
- continue
1
stderr:
Well, this is embarrassing.

brush had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/tmp/report-dec3f68c-c05f-49a5-af63-cb3d8b817772.toml". Submit an issue or email with the subject of "brush Crash Report" and include the report as an attachment.


To submit the crash report:

please post a GitHub issue at https://github.com/reubeno/brush/issues/new

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!