Results for builtin-trap-err.test.sh

statusoshosh-cpp
pass 99
ok 11
FAIL 44
total1414
caseoshosh-cppdescription
0pass pass trap can use original $LINENO
1pass pass trap ERR and set -o errexit
2pass pass trap ERR and errexit disabled context
3pass pass trap ERR and if statement
4FAIL FAIL trap err and || conditional (regression)
detailsdetails
5FAIL FAIL trap ERR does not run in errexit situations
detailsdetails
6FAIL FAIL trap ERR pipeline (also errexit)
detailsdetails
7pass pass trap ERR subprogram - subshell, command sub, async
8pass pass trap ERR not active in shell functions in (bash behavior)
9FAIL FAIL trap ERR shell function - with errtrace
detailsdetails
10pass pass trap ERR with YSH proc
11pass pass trap ERR
12ok ok trap ERR and pipelines (lastpipe and PIPESTATUS difference)
detailsdetails
13pass pass error in trap ERR (recursive)
18 passed, 2 OK, 0 not implemented, 0 BUG, 8 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

osh4 trap err and || conditional (regression)

[osh stdout] Expected 'line=3\nok\n', got 'line=3\nline=3\nok\n'

stdout:
line=3
line=3
ok
stderr:
osh-cpp4 trap err and || conditional (regression)

[osh-cpp stdout] Expected 'line=3\nok\n', got 'line=3\nline=3\nok\n'

stdout:
line=3
line=3
ok
stderr:
osh5 trap ERR does not run in errexit situations

[osh stdout] Expected 'until\nline=16\nline=20\nline=20\nline=20\nok\n' Got 'until\nline=16\nline=16\nline=20\nline=20\nline=20\nok\n'

stdout:
until
line=16
line=16
line=20
line=20
line=20
ok
stderr:
osh-cpp5 trap ERR does not run in errexit situations

[osh-cpp stdout] Expected 'until\nline=16\nline=20\nline=20\nline=20\nok\n' Got 'until\nline=16\nline=16\nline=20\nline=20\nline=20\nok\n'

stdout:
until
line=16
line=16
line=20
line=20
line=20
ok
stderr:
osh6 trap ERR pipeline (also errexit)

[osh stdout] Expected 'line=3\nline=5\n', got 'line=3\nline=3\nline=5\nline=5\n'

stdout:
line=3
line=3
line=5
line=5
stderr:
osh-cpp6 trap ERR pipeline (also errexit)

[osh-cpp stdout] Expected 'line=3\nline=5\n', got 'line=3\nline=3\nline=5\nline=5\n'

stdout:
line=3
line=3
line=5
line=5
stderr:
osh9 trap ERR shell function - with errtrace

[osh stdout] Expected 'line=14\nnow with errtrace\nline=4\nline=10\nline=20\nok\n' Got 'line=10\nline=16\nnow with errtrace\nline=10\nok\n'

stdout:
line=10
line=16
now with errtrace
line=10
ok
stderr:
  set -o errtrace
  ^~~
[ stdin ]:16: 'set' got invalid option 'errtrace'
osh-cpp9 trap ERR shell function - with errtrace

[osh-cpp stdout] Expected 'line=14\nnow with errtrace\nline=4\nline=10\nline=20\nok\n' Got 'line=10\nline=16\nnow with errtrace\nline=10\nok\n'

stdout:
line=10
line=16
now with errtrace
line=10
ok
stderr:
  set -o errtrace
  ^~~
[ stdin ]:16: 'set' got invalid option 'errtrace'
osh12 trap ERR and pipelines (lastpipe and PIPESTATUS difference)

stdout:
A
err [] status=1 []
B
err [] status=1 [0 0]
err [] status=1 [0 1]
err [] status=1 [0 1 0]
ok
stderr:
osh-cpp12 trap ERR and pipelines (lastpipe and PIPESTATUS difference)

stdout:
A
err [] status=1 []
B
err [] status=1 [0 0]
err [] status=1 [0 1]
err [] status=1 [0 1 0]
ok
stderr: