summaryrefslogtreecommitdiff
path: root/testit.sh
diff options
context:
space:
mode:
authorjbj <jbj>2009-07-25 18:52:36 +0000
committerjbj <jbj>2009-07-25 18:52:36 +0000
commit11f0e2b5d4f2987eebaa244970d962c9c9e3d0b9 (patch)
treec0d0a6ca4b073e86eb5040a3742195050548af32 /testit.sh
parent8d10e06e834414ac7dfba42e582f4dcab97dfe85 (diff)
downloadlibpopt-11f0e2b5d4f2987eebaa244970d962c9c9e3d0b9.tar.gz
- add POPT_ARG_SHORT handling.
Diffstat (limited to 'testit.sh')
-rwxr-xr-xtestit.sh65
1 files changed, 35 insertions, 30 deletions
diff --git a/testit.sh b/testit.sh
index 0a0ba09..1f833f9 100755
--- a/testit.sh
+++ b/testit.sh
@@ -84,40 +84,43 @@ run test1 "test1 - 31" "arg1: 0 arg2: 'foo bar' rest: boggle" --grabbar boggle
run test1 "test1 - 32" "arg1: 0 arg2: (none) aInt: 123456789" -i 123456789
run test1 "test1 - 33" "arg1: 0 arg2: (none) aInt: 123456789" --int 123456789
-run test1 "test1 - 34" "arg1: 0 arg2: (none) aLong: 1123456789" -l 1123456789
-run test1 "test1 - 35" "arg1: 0 arg2: (none) aLong: 1123456789" --long 1123456789
-run test1 "test1 - 36" "arg1: 0 arg2: (none) aLongLong: 1111123456789" -L 1111123456789
-run test1 "test1 - 37" "arg1: 0 arg2: (none) aLongLong: 1111123456789" --longlong 1111123456789
-
-run test1 "test1 - 38" "arg1: 0 arg2: (none) aFloat: 10.1" -f 10.1
-run test1 "test1 - 39" "arg1: 0 arg2: (none) aFloat: 10.1" --float 10.1
-run test1 "test1 - 40" "arg1: 0 arg2: (none) aDouble: 10.1" -d 10.1
-run test1 "test1 - 41" "arg1: 0 arg2: (none) aDouble: 10.1" --double 10.1
-
-run test1 "test1 - 42" "arg1: 0 arg2: (none) oStr: (none)" --optional
-run test1 "test1 - 43" "arg1: 0 arg2: (none) oStr: yadda" --optional=yadda
-run test1 "test1 - 44" "arg1: 0 arg2: (none) oStr: yadda" --optional yadda
-run test1 "test1 - 45" "arg1: 0 arg2: (none) oStr: ping rest: pong" --optional=ping pong
-run test1 "test1 - 46" "arg1: 0 arg2: (none) oStr: ping rest: pong" --optional ping pong
-run test1 "test1 - 47" "arg1: 0 arg2: (none) aArgv: A B rest: C" --argv A --argv B C
-
-run test1 "test1 - 48" "arg1: 0 arg2: foo=bar" -2foo=bar
-run test1 "test1 - 49" "arg1: 0 arg2: foo=bar" -2=foo=bar
-
-run test1 "test1 - 50" "arg1: 0 arg2: (none) aFlag: 0xfeed" --bitxor
-run test1 "test1 - 51" "arg1: 0 arg2: (none) aFlag: 0xffff" --bitset
-run test1 "test1 - 52" "arg1: 0 arg2: (none) aFlag: 0x28c" --bitclr
-run test1 "test1 - 53" "arg1: 0 arg2: (none) aFlag: 0x8888" --nobitset
-run test1 "test1 - 54" "arg1: 0 arg2: (none) aFlag: 0xface" --nobitclr
+run test1 "test1 - 34" "arg1: 0 arg2: (none) aShort: 12345" -s 12345
+run test1 "test1 - 35" "arg1: 0 arg2: (none) aShort: 12345" --short 12345
+run test1 "test1 - 36" "arg1: 0 arg2: (none) aLong: 1123456789" -l 1123456789
+run test1 "test1 - 37" "arg1: 0 arg2: (none) aLong: 1123456789" --long 1123456789
+run test1 "test1 - 38" "arg1: 0 arg2: (none) aLongLong: 1111123456789" -L 1111123456789
+run test1 "test1 - 39" "arg1: 0 arg2: (none) aLongLong: 1111123456789" --longlong 1111123456789
+
+run test1 "test1 - 40" "arg1: 0 arg2: (none) aFloat: 10.1" -f 10.1
+run test1 "test1 - 41" "arg1: 0 arg2: (none) aFloat: 10.1" --float 10.1
+run test1 "test1 - 42" "arg1: 0 arg2: (none) aDouble: 10.1" -d 10.1
+run test1 "test1 - 43" "arg1: 0 arg2: (none) aDouble: 10.1" --double 10.1
+
+run test1 "test1 - 44" "arg1: 0 arg2: (none) oStr: (none)" --optional
+run test1 "test1 - 45" "arg1: 0 arg2: (none) oStr: yadda" --optional=yadda
+run test1 "test1 - 46" "arg1: 0 arg2: (none) oStr: yadda" --optional yadda
+run test1 "test1 - 47" "arg1: 0 arg2: (none) oStr: ping rest: pong" --optional=ping pong
+run test1 "test1 - 48" "arg1: 0 arg2: (none) oStr: ping rest: pong" --optional ping pong
+run test1 "test1 - 49" "arg1: 0 arg2: (none) aArgv: A B rest: C" --argv A --argv B C
+
+run test1 "test1 - 50" "arg1: 0 arg2: foo=bar" -2foo=bar
+run test1 "test1 - 51" "arg1: 0 arg2: foo=bar" -2=foo=bar
+
+run test1 "test1 - 52" "arg1: 0 arg2: (none) aFlag: 0xfeed" --bitxor
+run test1 "test1 - 53" "arg1: 0 arg2: (none) aFlag: 0xffff" --bitset
+run test1 "test1 - 54" "arg1: 0 arg2: (none) aFlag: 0x28c" --bitclr
+run test1 "test1 - 55" "arg1: 0 arg2: (none) aFlag: 0x8888" --nobitset
+run test1 "test1 - 56" "arg1: 0 arg2: (none) aFlag: 0xface" --nobitclr
run test1 "test1 - 55" "\
Usage: lt-test1 [-I?] [-c|--cb2=STRING] [--arg1] [-2|--arg2=ARG]
[-3|--arg3=ANARG] [-onedash] [--optional=STRING] [--val]
- [-i|--int=INT] [-l|--long=LONG] [-L|--longlong=LONGLONG]
- [-f|--float=FLOAT] [-d|--double=DOUBLE] [--randint=INT]
- [--randlong=LONG] [--randlonglong=LONGLONG] [--argv] [--bitset]
- [--bitclr] [--bitxor] [--nstr=STRING] [--lstr=STRING] [-I|--inc]
- [-c|--cb=STRING] [--longopt] [-?|--help] [--usage] [--simple=ARG]" --usage
+ [-i|--int=INT] [-s|--short=SHORT] [-l|--long=LONG]
+ [-L|--longlong=LONGLONG] [-f|--float=FLOAT] [-d|--double=DOUBLE]
+ [--randint=INT] [--randshort=SHORT] [--randlong=LONG]
+ [--randlonglong=LONGLONG] [--argv] [--bitset] [--bitclr] [--bitxor]
+ [--nstr=STRING] [--lstr=STRING] [-I|--inc] [-c|--cb=STRING]
+ [--longopt] [-?|--help] [--usage] [--simple=ARG]" --usage
run test1 "test1 - 56" "\
Usage: lt-test1 [OPTION...]
@@ -131,12 +134,14 @@ Usage: lt-test1 [OPTION...]
string argument
--val POPT_ARG_VAL: 125992 141421
-i, --int=INT POPT_ARG_INT: 271828 (default: 271828)
+ -s, --short=SHORT POPT_ARG_SHORT: 4523 (default: 4523)
-l, --long=LONG POPT_ARG_LONG: 738905609 (default: 738905609)
-L, --longlong=LONGLONG POPT_ARG_LONGLONG: 738905609 (default:
738905609)
-f, --float=FLOAT POPT_ARG_FLOAT: 3.14159 (default: 3.14159)
-d, --double=DOUBLE POPT_ARG_DOUBLE: 9.8696 (default: 9.8696)
--randint=INT POPT_ARGFLAG_RANDOM: experimental
+ --randshort=SHORT POPT_ARGFLAG_RANDOM: experimental
--randlong=LONG POPT_ARGFLAG_RANDOM: experimental
--randlonglong=LONGLONG POPT_ARGFLAG_RANDOM: experimental
--argv POPT_ARG_ARGV: append arg to array (can be