diff --git a/test/output.sh b/test/output.sh index 4731daa..271c23b 100755 --- a/test/output.sh +++ b/test/output.sh @@ -1,58 +1,58 @@ #!/bin/bash -function desc() { - echo "\033[01;38;5;022m############### $1 ###############\033[0m" +make_title() { + printf '\033[01;38;5;022m############### %s ###############\033[0m\n' "$1" } -desc "LIST" +make_title "LIST" ./bin/cli.js lib/api.js -desc "SUMMARY" +make_title "SUMMARY" ./bin/cli.js lib/api.js -s -desc "DEPENDS" +make_title "DEPENDS" ./bin/cli.js lib/api.js -d log.js -desc "CIRCULAR (OK)" +make_title "CIRCULAR (OK)" ./bin/cli.js test/cjs/a.js -c -desc "CIRCULAR (FOUND, NO INDEX COUNTING)" +make_title "CIRCULAR (FOUND, NO INDEX COUNTING)" ./bin/cli.js test/cjs/circular/a.js -c --no-count -desc "CIRCULAR (FOUND, WITH INDEX COUNT)" +make_title "CIRCULAR (FOUND, WITH INDEX COUNT)" ./bin/cli.js test/cjs/circular/a.js -c -desc "NPM" +make_title "NPM" ./bin/cli.js test/cjs/npm.js --include-npm -desc "STDIN" +make_title "STDIN" ./bin/cli.js --json lib/api.js | tr '[a-z]' '[A-Z]' | ./bin/cli.js --stdin -desc "IMAGE" +make_title "IMAGE" ./bin/cli.js lib/api.js --image /tmp/test.svg -desc "DOT" +make_title "DOT" ./bin/cli.js lib/api.js --dot -desc "JSON" +make_title "JSON" ./bin/cli.js lib/api.js --json -desc "NO COLOR" +make_title "NO COLOR" ./bin/cli.js lib/api.js --no-color -desc "SHOW EXTENSION" +make_title "SHOW EXTENSION" ./bin/cli.js lib/api.js --show-extension -desc "WARNINGS (NOTE)" +make_title "WARNINGS (NOTE)" ./bin/cli.js test/cjs/missing.js -c -desc "WARNINGS (LIST)" +make_title "WARNINGS (LIST)" ./bin/cli.js test/cjs/missing.js -c --warning -desc "ERROR" +make_title "ERROR" ./bin/cli.js file/not/found.js -desc "DEBUG" +make_title "DEBUG" ./bin/cli.js lib/log.js --debug exit 0