Results for errexit-osh.test.sh

statusoshosh-cpp
pass 3512
FAIL 023
total3535
caseoshosh-cppdescription
0pass FAIL command sub: errexit is NOT inherited and outer shell keeps going
details
1pass FAIL command sub with inherit_errexit only
details
2pass FAIL strict_errexit and assignment builtins (local, export, readonly ...)
details
3pass FAIL strict_errexit and command sub in export / readonly
details
4pass pass strict_errexit disallows pipeline
5pass pass strict_errexit allows singleton pipeline
6pass pass strict_errexit with && || !
7pass pass strict_errexit detects proc in && || !
8pass pass strict_errexit without errexit proc
9pass FAIL strict_errexit without errexit proc / command sub
details
10pass FAIL strict_errexit and errexit disabled
details
11pass FAIL command sub with command_sub_errexit only
details
12pass FAIL command_sub_errexit stops at first error
details
13pass FAIL command sub with inherit_errexit and command_sub_errexit
details
14pass FAIL command sub: last command fails but keeps going and exit code is 0
details
15pass FAIL global assignment with command sub: middle command fails
details
16pass FAIL global assignment with command sub: last command fails and it aborts
details
17pass FAIL local: middle command fails and keeps going
details
18pass FAIL local: last command fails and also keeps going
details
19pass FAIL local and inherit_errexit / command_sub_errexit
details
20pass FAIL global assignment when last status is failure
details
21pass pass strict_errexit prevents errexit from being disabled in function
22pass pass strict_errexit prevents errexit from being disabled in brace group
23pass pass strict_errexit prevents errexit from being disabled in subshell
24pass pass strict_errexit and ! && || if while until
25pass pass if pipeline doesn't fail fatally
26pass pass errexit is silent (verbose_errexit for Oils)
27pass FAIL command sub errexit preserves exit code
details
28pass FAIL What's in strict:all?
details
29pass FAIL command_sub_errexit causes local d=$(date %x) to fail
details
30pass FAIL command_sub_errexit and command sub in array
details
31pass FAIL OLD: command sub in conditional, with inherit_errexit
details
32pass FAIL OLD: command sub in redirect in conditional
details
33pass pass Regression
34pass FAIL ShAssignment used as conditional
details
47 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh-cpp0 command sub: errexit is NOT inherited and outer shell keeps going

[osh-cpp stdout] Expected 'one two\nparent status=0\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $(echo one; false; echo two)  # bash/ash keep going
                                  ^
[ stdin ]:2: Invalid word while parsing command list
osh-cpp1 command sub with inherit_errexit only

[osh-cpp stdout] Expected 'zero\none\nparent status=0\n' Got 'zero\n'
[osh-cpp status] Expected 0 Got 2

stdout:
zero
stderr:
  echo $(echo one; false; echo two)  # bash/ash keep going
                                  ^
[ stdin ]:4: Invalid word while parsing command list
osh-cpp2 strict_errexit and assignment builtins (local, export, readonly ...)

[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
    local x=$(echo hi; false)
                            ^
[ stdin ]:5: Invalid word while parsing command list
osh-cpp3 strict_errexit and command sub in export / readonly

[osh-cpp stdout] Expected 'a\nstatus=1\na\nstatus=1\na\nb\nstatus=0\n' Got 'status=2\nstatus=2\nstatus=2\n'

stdout:
status=2
status=2
status=2
stderr:
  echo a; export x=$(might-fail); echo b
                               ^
[ -c flag ]:1: Invalid word while parsing command list
  echo a; readonly x=$(might-fail); echo b
                                 ^
[ -c flag ]:1: Invalid word while parsing command list
  echo a; x=$(true); echo b
                  ^
[ -c flag ]:1: Invalid word while parsing command list
osh-cpp9 strict_errexit without errexit proc / command sub

[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
    x=$(false)
             ^
[ stdin ]:6: Invalid word while parsing command list
osh-cpp10 strict_errexit and errexit disabled

[osh-cpp stdout] Expected 'before\nx=\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
    x=$(false)
             ^
[ stdin ]:8: Invalid word while parsing command list
osh-cpp11 command sub with command_sub_errexit only

[osh-cpp stdout] Expected 'zero\none two\nparent status=0\n' Got 'zero\n'
[osh-cpp status] Expected 0 Got 2

stdout:
zero
stderr:
  echo $(echo one; false; echo two)  # bash/ash keep going
                                  ^
[ stdin ]:4: Invalid word while parsing command list
osh-cpp12 command_sub_errexit stops at first error

[osh-cpp stdout] Expected 'OK\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
    echo $(date %d) $(touch BAD)
                  ^
[ stdin ]:9: Invalid word while parsing command list
osh-cpp13 command sub with inherit_errexit and command_sub_errexit

[osh-cpp status] Expected 1 Got 2

stdout:
zero
stderr:
  echo $(echo one; false; echo two)  # bash/ash keep going
                                  ^
[ stdin ]:6: Invalid word while parsing command list
osh-cpp14 command sub: last command fails but keeps going and exit code is 0

[osh-cpp stdout] Expected 'one\nstatus=0\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $(echo one; false)  # we lost the exit code
                        ^
[ stdin ]:2: Invalid word while parsing command list
osh-cpp15 global assignment with command sub: middle command fails

[osh-cpp stdout] Expected 'one\ntwo\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  s=$(echo one; false; echo two;)
                                ^
[ stdin ]:2: Unexpected EOF while parsing command
osh-cpp16 global assignment with command sub: last command fails and it aborts

[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
  s=$(echo one; false)
                     ^
[ stdin ]:2: Invalid word while parsing command list
osh-cpp17 local: middle command fails and keeps going

[osh-cpp stdout] Expected 'good\nstatus=0\none two\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
    local x=$(echo one; false; echo two)
                                       ^
[ stdin ]:4: Invalid word while parsing command list
osh-cpp18 local: last command fails and also keeps going

[osh-cpp stdout] Expected 'good\nstatus=0\none\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
    local x=$(echo one; false)
                             ^
[ stdin ]:4: Invalid word while parsing command list
osh-cpp19 local and inherit_errexit / command_sub_errexit

[osh-cpp stdout] Expected 'good\n' Got ''
[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
    local x=$(echo one; false; echo two)
                                       ^
[ stdin ]:6: Invalid word while parsing command list
osh-cpp20 global assignment when last status is failure

[osh-cpp stdout] Expected 'status=0\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  x=$(false) || true   # from abuild
           ^
[ stdin ]:2: Invalid word while parsing command list
osh-cpp27 command sub errexit preserves exit code

[osh-cpp status] Expected 42 Got 2

stdout:
before
stderr:
  echo $(exit 42)
                ^
[ stdin ]:5: Invalid word while parsing command list
osh-cpp28 What's in strict:all?

[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
    local d=$(date %x)
                     ^
[ stdin ]:6: Invalid word while parsing command list
osh-cpp29 command_sub_errexit causes local d=$(date %x) to fail

[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
    local x=$(true)
                  ^
[ stdin ]:6: Invalid word while parsing command list
osh-cpp30 command_sub_errexit and command sub in array

[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
  readonly -a myarray=( one "$(date %x)" two )
                                      ^
[ stdin ]:7: Invalid word while parsing command list
osh-cpp31 OLD: command sub in conditional, with inherit_errexit

[osh-cpp stdout] Expected '1 2\nA\ndone\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  if echo $(echo 1; false; echo 2); then
                                 ^
[ stdin ]:3: Invalid word while parsing command list
osh-cpp32 OLD: command sub in redirect in conditional

[osh-cpp stdout] Expected '2\ntmp_contents\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  if echo tmp_contents > $(echo tmp); then
                                   ^
[ stdin ]:3: Invalid word while parsing command list
osh-cpp34 ShAssignment used as conditional

[osh-cpp stdout] Expected 'yes\nyes\n' Got ''
[osh-cpp status] Expected 1 Got 2

stdout:
stderr: 
  while x=$(false)
                 ^
[ stdin ]:1: Invalid word while parsing command list