]>
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
14 # german variant of klingon used for testing usage of non-existent l10n
15 export LC_ALL=tlh_DE.UTF-8
17 checkversionmessage() {
18 testsuccess grep '^apt .* (' ${1}-help.output
22 checkversionmessage "$1"
23 testsuccess grep '^Usage:' ${1}-help.output
28 cp -f rootdir/tmp/testsuccess.output ${1}-help.output
31 testsuccess $1 --version
32 cp -f rootdir/tmp/testsuccess.output ${1}-help.output
33 checkversionmessage "$1"
36 for CMD in 'apt-cache' 'apt-cdrom' 'apt-config' \
37 'apt-extracttemplates' 'apt-get' 'apt-helper' \
38 'apt-mark' 'apt-sortpkgs' 'apt' 'apt-ftparchive'; do
39 cmd="$(echo "$CMD" | tr -d '-')"
40 msgtest 'Test for failure with no parameters calling' "$CMD"
41 if $cmd > ${cmd}-help.output 2>&1; then
43 cat ${cmd}-help.output
48 checkhelpmessage "$cmd"
52 for CMD in 'apt-dump-solver' 'apt-internal-solver' 'apt-internal-planner'; do
53 checkoptions "$(echo "$CMD" | tr -d '-')"
56 # in times of need, we all look for super cow to save the day
57 testsuccess aptget moo
58 testsuccess aptget moo -q=2
59 testsuccess aptget moo moo
60 testsuccess aptget moo moo -q=2
61 testsuccess aptget moo moo --color
62 testsuccess aptget moo moo moo
63 testsuccess aptget moo moo moo -q=2
64 testsuccess aptget moo moo moo moo
65 testsuccess aptget moo moo moo moo -q=2