]>
git.saurik.com Git - apt.git/blob - test/integration/test-00-commands-have-help
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture 'amd64'
10 # this test does double duty: The obvious is checking for --help and co,
11 # but it also checks if the binary can find all methods in the library.
12 # The later is quite handy for manual testing of non-abibreaking changes
15 checkversionmessage() {
16 testsuccess grep '^apt .* (' ${1}-help.output
20 checkversionmessage "$1"
21 testsuccess grep '^Usage:' ${1}-help.output
26 cp -f rootdir/tmp/testsuccess.output ${1}-help.output
29 testsuccess $1 --version
30 cp -f rootdir/tmp/testsuccess.output ${1}-help.output
31 checkversionmessage "$1"
34 for CMD in 'apt-cache' 'apt-cdrom' 'apt-config' \
35 'apt-extracttemplates' 'apt-get' 'apt-helper' \
36 'apt-mark' 'apt-sortpkgs' 'apt' 'apt-ftparchive'; do
37 cmd="$(echo "$CMD" | tr -d '-')"
38 msgtest 'Test for failure with no parameters calling' "$CMD"
39 if $cmd > ${cmd}-help.output 2>&1; then
41 cat ${cmd}-help.output
46 checkhelpmessage "$cmd"
50 for CMD in 'apt-dump-solver' 'apt-internal-solver'; do
51 checkoptions "$(echo "$CMD" | tr -d '-')"
54 # in times of need, we all look for super cow to save the day
55 testsuccess aptget moo
56 testsuccess aptget moo -q=2
57 testsuccess aptget moo moo
58 testsuccess aptget moo moo -q=2
59 testsuccess aptget moo moo --color
60 testsuccess aptget moo moo moo
61 testsuccess aptget moo moo moo -q=2
62 testsuccess aptget moo moo moo moo
63 testsuccess aptget moo moo moo moo -q=2