summaryrefslogtreecommitdiff
path: root/testit.sh
diff options
context:
space:
mode:
authorjbj <jbj>2010-06-18 18:36:19 +0000
committerjbj <jbj>2010-06-18 18:36:19 +0000
commitbe4bd694dc54fc0f8730d8b71957d37626f81d70 (patch)
treeb1ee4e72b0f1058152c612c0b40481982515109b /testit.sh
parent73be8af7e8c2440f6cfe6a09627af260529966d8 (diff)
downloadlibpopt-be4bd694dc54fc0f8730d8b71957d37626f81d70.tar.gz
- tests: test-cases for UNWANTEDARGS (Wayne Davison<wayned@samba.org>).
Diffstat (limited to 'testit.sh')
-rwxr-xr-xtestit.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/testit.sh b/testit.sh
index 2779f7c..d90bc72 100755
--- a/testit.sh
+++ b/testit.sh
@@ -7,7 +7,7 @@ run() {
echo Running test $name.
- result=`HOME=$builddir $builddir/$prog $*`
+ result=`HOME=$builddir $builddir/$prog $* 2>&1`
if [ "$answer" != "$result" ]; then
echo "Test \"$prog $*\" failed with: \"$result\" != \"$answer\" "
exit 2
@@ -114,7 +114,10 @@ run test1 "test1 - 56" "arg1: 0 arg2: (none) aFlag: 0xface" --nobitclr
run test1 "test1 - 57" "arg1: 0 arg2: (none) aBits: foo,baz" --bits foo,bar,baz,!bar
-run test1 "test1 - 58" "\
+run test1 "test1 - 58" "test1: bad argument --arg1=illegal: option does not take an argument" --arg1=illegal
+run test1 "test1 - 59" "test1: bad argument --=illegal: option does not take an argument" --=illegal
+
+run test1 "test1 - 60" "\
Usage: test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
[-3|--arg3=ANARG] [-onedash] [--optional=STRING] [--val]
[-i|--int=INT] [-s|--short=SHORT] [-l|--long=LONG]
@@ -123,7 +126,7 @@ Usage: test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
[--randlonglong=LONGLONG] [--argv=STRING] [--bitset] [--bitclr]
[--bitxor] [--nstr=STRING] [--lstr=STRING] [-I|--inc]
[-c|--cb=STRING] [--longopt] [-?|--help] [--usage] [--simple=ARG]" --usage
-run test1 "test1 - 59" "\
+run test1 "test1 - 61" "\
Usage: test1 [OPTION...]
--arg1 First argument with a really long
description. After all, we have to test