Browse Source

poc test 1

main
pvincent 2 weeks ago
parent
commit
9a0047d039
  1. 6
      poc
  2. 14
      test/stub/scenario.bash

6
poc

@ -107,8 +107,12 @@ function on_error {
if [[ $$ == "$BASHPID" ]]; then
if [[ ! -v failure_type ]]; then
if [[ ${BASH_COMMAND} == 'false' ]]; then
failure_type="FALSE"
else
failure_type="COMMAND_ERROR"
failure_payload="${BASH_COMMAND}"
fi
print_miaou_error "${BASH_SOURCE[1]}" "${BASH_LINENO[0]}" "${failure_code}" "${failure_type}"
fi
@ -270,7 +274,7 @@ function on_exit {
miaou_debug "</on_exit>"
fi
if [[ -v failure_type ]]; then
if [[ $code -gt 0 && -v failure_type ]]; then
2>&3 >&4 dump_failure
2>&3 >&4 dump_stacktrace
fi

14
test/stub/scenario.bash

@ -69,17 +69,9 @@ function do_false {
}
function do_success {
echo -n 'SUCCESS args=['
(
IFS=','
echo -n "$*"
)
echo ']'
source "${MIAOU_BASH_DIR}/lib/ansi.bash"
local content
content=$(PADDING_LEFT=2 PADDING_RIGHT=6 style_padding 'this is success')
content=$(FG=YELLOW BG=BLUE style_ansi "$content")
FG=BLACK BG=RED PADDING=8 style_block "$content"
[[ true==true ]] && echo true
! false && echo unfalse
return
}
function do_unbound_variable {

Loading…
Cancel
Save