]>
git.ipfire.org Git - thirdparty/systemd.git/blob - tools/check-help.sh
4 export SYSTEMD_LOG_LEVEL
=info
7 if "$1" --help |
grep -v 'default:' |
grep -E -q '.{80}.'; then
8 echo "$(basename "$1") --help output is too wide:"
9 "$1" --help |
awk 'length > 80' |
grep -E --color=yes '.{80}'
13 # --help prints something. Also catches case where args are ignored.
14 if ! "$1" --help |
grep -q .
; then
15 echo "$(basename "$1") --help output is empty."
19 # no --help output to stdout
20 if "$1" --help 2>&1 1>/dev
/null |
grep .
; then
21 echo "$(basename "$1") --help prints to stderr"
25 # error output to stderr
26 if ! "$1" --no-such-parameter 2>&1 1>/dev
/null |
grep -q .
; then
27 echo "$(basename "$1") with an unknown parameter does not print to stderr"