diff --git a/test/stub/ansi_error.bash b/test/stub/ansi_error.bash index 8b73b29..5786f79 100755 --- a/test/stub/ansi_error.bash +++ b/test/stub/ansi_error.bash @@ -2,6 +2,7 @@ . "$MIAOU_BASH_DIR/lib/ansi.bash" +CODE=118 TYPE='SUBSHELL TERM' PAYLOAD='blabla' stack_sources=('file.bash' './lib/utility.bash' 'file.bash') @@ -21,10 +22,13 @@ function ansi_block_error { FG=BLACK PADDING=2 + local content detail exit_code + content=$(style_ansi "${TYPE}") content=$(style_padding "$content") detail=$(BG=BLACK style_padding "${PAYLOAD}") - style_block "$content$detail" + exit_code=$(FG=WHITE style_ansi " ${CODE}") + style_block "$content$detail$exit_code" ansi_reset }