Results for introspect.test.sh

statusbashosh
pass 1112
ok 01
FAIL 20
total1313
casebashoshdescription
0pass pass ${FUNCNAME[@]} array
1FAIL pass FUNCNAME with source (scalar or array)
details
2pass pass BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv)
3pass pass ${FUNCNAME} with prefix/suffix operators
4pass pass operators on FUNCNAME
5pass pass ${FUNCNAME} and "set -u" (OSH regression)
6pass pass $((BASH_LINENO)) (scalar form in arith)
7pass pass ${BASH_SOURCE[@]} with source and function name
8pass pass ${BASH_SOURCE[@]} with line numbers
9pass pass ${BASH_LINENO[@]} is a stack of line numbers for function calls
10pass pass Locations with temp frame
11FAIL ok Locations when sourcing
detailsdetails
12pass pass Sourcing inside function grows the debug stack
23 passed, 1 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

bash1 FUNCNAME with source (scalar or array)

[bash stdout] Expected "[' @', 'source', 'f', 'g']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[' @', 'source']\n[' 0', 'source']\n['${}', '']\n[' $', '']\n-----\n[]\n-----\n[' @', 'A']\n[' 0', 'A']\n['${}', 'A']\n[' $', 'A']\n" Got "[' @', 'source', 'f', 'g']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[' @']\n[' 0', '']\n['${}', '']\n[' $', '']\n-----\n[]\n-----\n[' @', 'A']\n[' 0', 'A']\n['${}', 'A']\n[' $', 'A']\n"

stdout:
['  @', 'source', 'f', 'g']
['  0', 'source']
['${}', 'source']
['  $', 'source']
-----
['  @']
['  0', '']
['${}', '']
['  $', '']
-----
[]
-----
['  @', 'A']
['  0', 'A']
['${}', 'A']
['  $', 'A']
stderr:
bash11 Locations when sourcing

[bash stdout] Expected 'F\nG\nSTACK:spec/testdata/bash-source-pushtemp.sh:g:3\nSTACK:spec/testdata/bash-source-pushtemp.sh:f:19\nSTACK:spec/testdata/bash-source-pushtemp.sh:source:1\n' Got 'F\nG\nSTACK:spec/testdata/bash-source-pushtemp.sh:g:3\nSTACK:spec/testdata/bash-source-pushtemp.sh:f:19\nSTACK:spec/testdata/bash-source-pushtemp.sh:source:2\n'

stdout:
F
G
STACK:spec/testdata/bash-source-pushtemp.sh:g:3
STACK:spec/testdata/bash-source-pushtemp.sh:f:19
STACK:spec/testdata/bash-source-pushtemp.sh:source:2
stderr:
osh11 Locations when sourcing

stdout:
F
G
STACK:spec/testdata/bash-source-pushtemp.sh:g:3
STACK:spec/testdata/bash-source-pushtemp.sh:f:19
STACK:spec/testdata/bash-source-pushtemp.sh:source:2
stderr: