Results for builtin-trap-err.test.sh

statusoshosh-cpp
pass 2020
ok 11
FAIL 22
total2323
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
4pass pass trap ERR and || conditional
5pass pass trap ERR and pipeline
6pass pass trap ERR pipelines without simple commands
7pass pass Pipeline group quirk
8pass pass trap ERR does not run in errexit situations
9pass pass trap ERR doesn't run in subprograms - subshell, command sub, async
10pass pass set -o errtrace: trap ERR runs in subprograms
11pass pass trap ERR doesn't run with &
12FAIL FAIL set -o errtrace: trap ERR with &
detailsdetails
13pass pass trap ERR not active in shell functions in (bash behavior)
14pass pass set -o errtrace - trap ERR runs in shell functions
15FAIL FAIL set -o errtrace - trap ERR runs in shell functions (LINENO)
detailsdetails
16pass pass trap ERR with "atoms": assignment (( [[
17pass pass trap ERR with for, case, { }
18pass pass trap ERR with redirect
19pass pass trap ERR with YSH proc
20pass pass trap ERR
21ok ok trap ERR and pipelines - PIPESTATUS difference
detailsdetails
22pass pass error in trap ERR (recursive)
40 passed, 2 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh12 set -o errtrace: trap ERR with &

[osh stdout] Expected 'line=8\nasync\n', got 'line=6\nline=8\nasync\n'

stdout:
line=6
line=8
async
stderr:
[1] Done PID 10020
[1] Done PID 10021
osh-cpp12 set -o errtrace: trap ERR with &

[osh-cpp stdout] Expected 'line=8\nasync\n', got 'line=6\nline=8\nasync\n'

stdout:
line=6
line=8
async
stderr:
[1] Done PID 10030
[1] Done PID 10032
osh15 set -o errtrace - trap ERR runs in shell functions (LINENO)

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

stdout:
line=10
now with errtrace
line=4
line=10
line=10
ok
stderr:
osh-cpp15 set -o errtrace - trap ERR runs in shell functions (LINENO)

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

stdout:
line=10
now with errtrace
line=4
line=10
line=10
ok
stderr:
osh21 trap ERR and pipelines - PIPESTATUS difference

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

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