This commit is contained in:
mes5k 2004-02-10 04:52:41 +00:00
parent 9f691ec858
commit 13a999a662
9 changed files with 36 additions and 19 deletions

View File

@ -31,7 +31,8 @@ TESTS = test1.sh \
test29.sh \
test30.sh \
test31.sh \
test32.sh
test32.sh \
test33.sh
EXTRA_DIST = $(TESTS) \
test1.out \
@ -65,5 +66,6 @@ EXTRA_DIST = $(TESTS) \
test29.out \
test30.out \
test31.out \
test32.out
test32.out \
test33.out

View File

@ -1,4 +1,4 @@
for A OR B we got : asdf
for string C we got : fdas
for string D we got : homer
for string D we got : 1
for E or F or G we got: blah

View File

@ -1,4 +1,4 @@
for A OR B we got : asdf
for string C we got : fdas
for string D we got : homer
for string D we got : 1
for E or F or G we got: asdf

View File

@ -4,7 +4,7 @@ PARSE ERROR: Argument: -b (--bbb)
USAGE:
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff <string>|-g <string>} [-d <string>] -c <string> [--] [-v] [-h]
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff <string>|-g <string>} -c <string> [--] [-v] [-h] [--ddd]
Where:
@ -25,9 +25,6 @@ Where:
(OR required) (value required) g test
-d <string>, --ddd <string>
(value required) d test
-c <string>, --ccc <string>
(required) (value required) c test
@ -40,6 +37,9 @@ Where:
-h, --help
Displays usage information and exits.
--ddd
d test
this is a message

View File

@ -1,10 +1,10 @@
PARSE ERROR:
One or more required arguments missing!
PARSE ERROR: Argument: -d
Couldn't find match for argument
USAGE:
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff <string>|-g <string>} [-d <string>] -c <string> [--] [-v] [-h]
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff <string>|-g <string>} -c <string> [--] [-v] [-h] [--ddd]
Where:
@ -25,9 +25,6 @@ Where:
(OR required) (value required) g test
-d <string>, --ddd <string>
(value required) d test
-c <string>, --ccc <string>
(required) (value required) c test
@ -40,6 +37,9 @@ Where:
-h, --help
Displays usage information and exits.
--ddd
d test
this is a message

View File

@ -4,7 +4,7 @@ PARSE ERROR: Argument: -b (--bbb)
USAGE:
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff <string>|-g <string>} [-d <string>] -c <string> [--] [-v] [-h]
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff <string>|-g <string>} -c <string> [--] [-v] [-h] [--ddd]
Where:
@ -25,9 +25,6 @@ Where:
(OR required) (value required) g test
-d <string>, --ddd <string>
(value required) d test
-c <string>, --ccc <string>
(required) (value required) c test
@ -40,6 +37,9 @@ Where:
-h, --help
Displays usage information and exits.
--ddd
d test
this is a message

View File

@ -1,4 +1,4 @@
for A OR B we got : asdf
for string C we got : fdas
for string D we got : homer
for string D we got : 1
for E or F or G we got: blah

4
tests/test33.out Normal file
View File

@ -0,0 +1,4 @@
for A OR B we got : asdf
for string C we got : fdas
for string D we got : 0
for E or F or G we got: blah

11
tests/test33.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
# success
../examples/test5 -a asdf -c fdas --eee blah --ddd > tmp.out 2>&1
if cmp -s tmp.out test33.out; then
exit 0
else
exit 1
fi