Browse Source

before ansi_error

main
pvincent 6 days ago
parent
commit
938abbb3ce
  1. 24
      test/stub/ansi_error.bash

24
test/stub/ansi_error.bash

@ -8,7 +8,15 @@ stack_sources=('file.bash' './lib/utility.bash' 'file.bash')
stack_lines=(18 56 12) stack_lines=(18 56 12)
stack_functions=('f2' 'f1' '<main>') stack_functions=('f2' 'f1' '<main>')
function dump_failure {
function ansi_block_continuation {
tput sc
tput cuu 1
BG=RED FG=BLACK style_ansi "\t╦"
tput rc
FG=RED style_ansi "\t║\n"
}
function ansi_block_error {
BG=RED BG=RED
FG=BLACK FG=BLACK
PADDING=2 PADDING=2
@ -21,15 +29,8 @@ function dump_failure {
ansi_reset ansi_reset
} }
function dump_traces {
function ansi_traces {
local optional location local optional location
# block continuation
tput sc
tput cuu 1
BG=RED FG=BLACK style_ansi "\t╦"
tput rc
FG=RED style_ansi "\t║\n"
optional=false optional=false
for i in "${!stack_sources[@]}"; do for i in "${!stack_sources[@]}"; do
@ -43,5 +44,6 @@ function dump_traces {
done done
} }
dump_failure
dump_traces
ansi_block_error
ansi_block_continuation
ansi_traces
Loading…
Cancel
Save