summaryrefslogtreecommitdiffstats
path: root/tests/getopts.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-20 15:52:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-20 15:52:45 -0400
commit60366e4583a1d148dd5f8171c9148ebb98890478 (patch)
treef0ab64b754339b6c20b2c17b5a1798e44009391f /tests/getopts.sh
parent962d715ce2dee7a017dacca3b787ade6d33cd1c6 (diff)
downloadbfs-60366e4583a1d148dd5f8171c9148ebb98890478.tar.xz
tests/color: Remove some useless cats
Diffstat (limited to 'tests/getopts.sh')
-rw-r--r--tests/getopts.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/getopts.sh b/tests/getopts.sh
index 6616a4a..7d3ef4b 100644
--- a/tests/getopts.sh
+++ b/tests/getopts.sh
@@ -8,7 +8,7 @@
# Print usage information
usage() {
local pad=$(printf "%*s" ${#0} "")
- color <<EOF
+ color cat <<EOF
Usage: ${GRN}$0${RST} [${BLU}--bfs${RST}=${MAG}path/to/bfs${RST}] [${BLU}--sudo${RST}[=${BLD}COMMAND${RST}]] [${BLU}--stop${RST}]
$pad [${BLU}--no-clean${RST}] [${BLU}--update${RST}] [${BLU}--verbose${RST}[=${BLD}LEVEL${RST}]] [${BLU}--help${RST}]
$pad [${BLU}--posix${RST}] [${BLU}--bsd${RST}] [${BLU}--gnu${RST}] [${BLU}--all${RST}] [${BLD}TEST${RST} [${BLD}TEST${RST} ...]]
@@ -117,7 +117,7 @@ parse_args() {
exit 0
;;
-*)
- cprintf "${RED}error:${RST} Unrecognized option '%s'.\n\n" "$arg" >&2
+ color printf "${RED}error:${RST} Unrecognized option '%s'.\n\n" "$arg" >&2
usage >&2
exit 1
;;
@@ -149,9 +149,9 @@ parse_args() {
done
if ((${#TEST_CASES[@]} == 0)); then
- cprintf "${RED}error:${RST} No tests matched" >&2
- cprintf " ${BLD}%s${RST}" "${PATTERNS[@]}" >&2
- cprintf ".\n\n" >&2
+ color printf "${RED}error:${RST} No tests matched" >&2
+ color printf " ${BLD}%s${RST}" "${PATTERNS[@]}" >&2
+ color printf ".\n\n" >&2
usage >&2
exit 1
fi