File: checkhelp

package info (click to toggle)
goobox 3.6.0-14
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,952 kB
  • sloc: ansic: 13,415; makefile: 157; xml: 134; python: 55; sh: 11
file content (21 lines) | stat: -rwxr-xr-x 280 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -e

# Test 1: Does the help output have at least 3 lines?
LC=$(goobox -h | wc -l)

CV=$(($LC > 3))

if [ "$CV" == 0 ]; then
    exit 1
fi

# Test 2: Is the help output printed even on the console?
goobox -h > /dev/null

if [ $? != 0 ]; then
    exit 1
fi

exit 0