Results for loop.test.sh

statusdashbash-4mkshzshosh
pass 2221212025
ok 24121
N-I 10000
BUG 22550
FAIL 00001
total2727272727
casedashbash-4mkshzshoshdescription
0pass pass pass pass pass implicit for loop
1pass pass pass pass FAIL empty for loop (has "in")
details
2pass ok ok BUG pass for loop with invalid identifier
detailsdetailsdetails
3pass pass pass pass pass the word 'in' can be the loop variable
4pass pass pass pass pass Tilde expansion within for loop
5N-I pass pass pass pass Brace Expansion within Array
details
6pass pass pass pass pass using loop var outside loop
7pass pass pass pass pass continue
8pass pass pass pass pass break
9pass pass pass pass ok dynamic control flow (KNOWN INCOMPATIBILITY)
details
10pass pass pass pass pass while in while condition
11pass pass pass pass pass while in pipe
12pass pass pass pass pass while in pipe with subshell
13pass pass pass pass pass until loop
14pass pass pass ok pass continue at top level
details
15ok ok BUG ok pass continue in subshell
detailsdetailsdetailsdetails
16BUG BUG BUG BUG pass continue in subshell aborts with errexit
detailsdetailsdetailsdetails
17ok ok pass pass pass bad arg to break
detailsdetails
18BUG ok BUG BUG pass too many args to continue
detailsdetailsdetailsdetails
19pass pass pass pass pass break in condition of loop
20pass pass pass pass pass break in condition of nested loop
21pass pass pass pass pass return within eval
22pass pass BUG pass pass break/continue within eval
details
23pass pass BUG BUG pass break/continue within source
detailsdetails
24pass BUG pass BUG pass top-level break/continue/return (without strict_control_flow)
detailsdetails
25pass pass pass pass pass multi-level break with argument
26pass pass pass pass pass multi-level continue
109 passed, 10 OK, 1 not implemented, 14 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh1 empty for loop (has "in")

[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1125, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 364, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 1955, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1777, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1674, in _Dispatch
    status = self._DoForEach(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1212, in _DoForEach
    assert iter_list, iter_list
AssertionError: []
bash-42 for loop with invalid identifier

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

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

stdout:
hi
stderr:
zsh: parse error near `-'
zsh: parse error near `done'
dash5 Brace Expansion within Array

stdout:
-{a,b}
{c,d}-
stderr:
osh9 dynamic control flow (KNOWN INCOMPATIBILITY)

stdout:
1
2
3
stderr:
    $b
    ^~
[ stdin ]:4: 'break' not found (OILS-ERR-100)
    $b
    ^~
[ stdin ]:4: 'break' not found (OILS-ERR-100)
    $b
    ^~
[ stdin ]:4: 'break' not found (OILS-ERR-100)
zsh14 continue at top level

stdout:
one
stderr:
continue: not in while, until, select, or repeat loop
dash15 continue in subshell

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
bash-415 continue in subshell

stdout:
> 1
subshell status=0
. 1
> 2
subshell status=0
. 2
stderr:
mksh15 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
zsh15 continue in subshell

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

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

stdout:
> 1
should fail after subshell
. 1
> 2
should fail after subshell
. 2
stderr:
mksh16 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
zsh16 continue in subshell aborts with errexit

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

stdout:
hi
stderr:
dash: 4: break: Illegal number: oops
bash-417 bad arg to break

stdout:
hi
stderr:
bash-4.4: line 4: break: oops: numeric argument required
dash18 too many args to continue

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

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

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

stdout:
a
b
c
--
stderr:
continue: too many arguments
continue: too many arguments
continue: too many arguments
mksh22 break/continue within eval

stdout:
1
2
3
4
5
stderr:
mksh: continue: can't continue
mksh: break: can't break
mksh23 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
zsh23 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
bash-424 top-level break/continue/return (without strict_control_flow)

stdout:
break=0
continue=0
return=1
stderr:
bash-4.4: line 0: break: only meaningful in a `for', `while', or `until' loop
bash-4.4: line 0: continue: only meaningful in a `for', `while', or `until' loop
bash-4.4: line 0: return: can only `return' from a function or sourced script
zsh24 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