modindex: getopt_long returns int not char (fix ppc64 bug)
[mit.git] / tests / test-depmod / 10badcommand.sh
blob898a4fa4c5ed85cdf1307c60049c23af213ebb4b
1 #! /bin/sh
3 # Test bad option handling.
4 for ENDIAN in -le -be; do
5 for BITNESS in 32 64; do
7 [ "`depmod --unknown 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
9 [ "`depmod -v --unknown 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
10 [ "`depmod --unknown -v 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
12 [ "`depmod 2.6.0 --unknown 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
13 [ "`depmod --unknown 2.6.0 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
15 [ "`depmod -v 2.6.0 --unknown 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
16 [ "`depmod -v --unknown 2.6.0 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
18 [ "`depmod 2.6.0 -v --unknown 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
19 [ "`depmod --unknown -v 2.6.0 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
21 [ "`depmod 2.6.0 --unknown -v 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
22 [ "`depmod --unknown 2.6.0 -v 2>&1 | head -1`" = "depmod: malformed/unrecognized option '--unknown'" ]
24 done
25 done