Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: edit test/output.sh comply with POSIX #391

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 19 additions & 19 deletions test/output.sh
Original file line number Diff line number Diff line change
@@ -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