Browse Source

ansi.test.bash

main
pvincent 1 week ago
parent
commit
3b3827a533
  1. 1
      lib/ansi.bash
  2. 8
      test/ansi.test.bash
  3. 2
      test/stub/scenario.bash

1
lib/ansi.bash

@ -94,6 +94,5 @@ function style_block {
for _ in $(seq 1 "${length}"); do builtin echo -n '═'; done
builtin echo "╝"
)
style_ansi "${bottom}" && echo
}

8
test/ansi.test.bash

@ -0,0 +1,8 @@
#!/usr/bin/env miaou-bash
. "$MIAOU_BASH_DIR/lib/ansi.bash"
content=$(BG=RED FG=BLACK style_ansi "SUBSHELL TERM")
content=$(PADDING=2 BG=RED style_padding "$content")
detail=$(PADDING=1 style_padding "blabla")
PADDING=2 BG=RED FG=BLACK style_block "$content$detail"

2
test/stub/scenario.bash

@ -9,8 +9,8 @@ readonly BASEDIR
function do_subshell_term {
# grep nope nope
echo "found=$(grep nope nope)"
echo "found=$(command_not_found)"
echo "found=$(grep nope nope)"
command_not_found
}

Loading…
Cancel
Save