File: test-help.sh

package info (click to toggle)
num-utils 0.5-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 984 kB
  • sloc: perl: 1,266; sh: 113; makefile: 94
file content (20 lines) | stat: -rwxr-xr-x 885 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

### copy tests from upstream to $AUTOPKGTEST_TMP
###cp debian/num-utils/usr/share/doc/num-utils/examples/* $AUTOPKGTEST_TMP

# test commands with -h, -help, --help without any other parameters
# Must print 'Usage:'
for cmd in numaverage numinterval numprocess numrange numsum numbound numgrep numnormalize numrandom numround; do 
	$cmd  -h    2>/dev/null | grep Usage; 
	$cmd  -help 2>/dev/null | grep Usage;
	$cmd --help 2>/dev/null | grep Usage;
done

# test commands with -h, -help, --help with any other parameters
# Must run help() and print only 'Usage:'
for cmd in numaverage numinterval numprocess numrange numsum numbound numgrep numnormalize numrandom numround; do 
	$cmd -iMld $AUTOPKGTEST_TMP/tests/columns  -h    2>/dev/null | grep Usage;
	$cmd -imd  $AUTOPKGTEST_TMP/tests/columns2 -help 2>/dev/null | grep Usage;
	$cmd --help 2>/dev/null | grep Usage;
done