diff --git a/tests/test_tint_functions b/tests/test_tint_functions index 7fb578c..55e766d 100644 --- a/tests/test_tint_functions +++ b/tests/test_tint_functions @@ -6,34 +6,30 @@ source $SCRIPT_DIR/../src/tint ESC='' RESET="${ESC}(B${ESC}[m" -BOLD="1" -DIM="2" -UNDERLINE="4" -BLINK="5" -INVERT="7" -HIDDEN="8" - -BLACK="30" -RED="31" -GREEN="32" -YELLOW="33" -BLUE="34" -MAGENTA="35" -CYAN="36" -LIGHT_GRAY="37" -WHITE="97" - -BLACK_BG="40" -RED_BG="41" -GREEN_BG="42" -YELLOW_BG="43" -BLUE_BG="44" -MAGENTA_BG="45" -CYAN_BG="46" -LIGHT_GRAY_BG="47" -RESET_BG="49" -GRAY_BG="100" -WHITE_BG="107" +BOLD="$(tput bold)" +DIM="$(tput dim)" +UNDERLINE="$(tput smul)" +BLINK="$(tput blink)" +INVERT="$(tput rev)" +HIDDEN="$(tput invis)" + +BLACK="$(tput setaf 0)" +RED="$(tput setaf 1)" +GREEN="$(tput setaf 2)" +YELLOW="$(tput setaf 3)" +BLUE="$(tput setaf 4)" +MAGENTA="$(tput setaf 5)" +CYAN="$(tput setaf 6)" +WHITE="$(tput setaf 7)" + +BLACK_BG="$(tput setab 0)" +RED_BG="$(tput setab 1)" +GREEN_BG="$(tput setab 2)" +YELLOW_BG="$(tput setab 3)" +BLUE_BG="$(tput setab 4)" +MAGENTA_BG="$(tput setab 5)" +CYAN_BG="$(tput setab 6)" +WHITE_BG="$(tput setab 7)" control_sequence() { while test $# -gt 0