mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-08-04 02:06:29 -04:00
changes for xor bug
This commit is contained in:
parent
ee4e8d9783
commit
3c55406797
@ -6,9 +6,11 @@ let "fail = 0"
|
||||
for tnam in `ls test*.sh`
|
||||
do
|
||||
echo "Running test $tnam"
|
||||
if ./$tnam && echo "OK" || echo "FAIL" ; then
|
||||
if ./$tnam; then
|
||||
echo "OK"
|
||||
let "suc = $(($suc + 1))"
|
||||
else
|
||||
echo "FAIL"
|
||||
let "fail = $(($fail + 1))"
|
||||
fi
|
||||
done
|
||||
|
@ -1,3 +1,6 @@
|
||||
for I:
|
||||
0 sss
|
||||
1 fdsf
|
||||
for A OR B we got : asdf
|
||||
for string C we got : fdas
|
||||
for string D we got : 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# success
|
||||
../examples/test5 -a asdf -c fdas --eee blah > tmp.out 2>&1
|
||||
../examples/test5 -a asdf -c fdas --eee blah -i sss -i fdsf > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test20.out; then
|
||||
exit 0
|
||||
|
@ -1,3 +1,5 @@
|
||||
for J:
|
||||
0 homer
|
||||
for A OR B we got : asdf
|
||||
for string C we got : fdas
|
||||
for string D we got : 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# success
|
||||
../examples/test5 -b asdf -c fdas -g asdf > tmp.out 2>&1
|
||||
../examples/test5 -b asdf -c fdas -g asdf -j homer > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test21.out; then
|
||||
exit 0
|
||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -b (--bbb)
|
||||
|
||||
Brief USAGE:
|
||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||
<string>|-g <string>} [--ddd] -c <string> [--] [-v]
|
||||
[-h]
|
||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
||||
... } [--ddd] -c <string> [--] [-v] [-h]
|
||||
|
||||
For complete USAGE and HELP type:
|
||||
../examples/test5 --help
|
||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -d
|
||||
|
||||
Brief USAGE:
|
||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||
<string>|-g <string>} [--ddd] -c <string> [--] [-v]
|
||||
[-h]
|
||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
||||
... } [--ddd] -c <string> [--] [-v] [-h]
|
||||
|
||||
For complete USAGE and HELP type:
|
||||
../examples/test5 --help
|
||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -b (--bbb)
|
||||
|
||||
Brief USAGE:
|
||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||
<string>|-g <string>} [--ddd] -c <string> [--] [-v]
|
||||
[-h]
|
||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
||||
... } [--ddd] -c <string> [--] [-v] [-h]
|
||||
|
||||
For complete USAGE and HELP type:
|
||||
../examples/test5 --help
|
||||
|
@ -1,3 +1,6 @@
|
||||
for I:
|
||||
0 one
|
||||
1 two
|
||||
for A OR B we got : asdf
|
||||
for string C we got : fdas
|
||||
for string D we got : 0
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# success
|
||||
../examples/test5 --aaa asdf -c fdas --fff blah > tmp.out 2>&1
|
||||
../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test25.out; then
|
||||
exit 0
|
||||
|
@ -1,3 +1,6 @@
|
||||
for J:
|
||||
0 o
|
||||
1 t
|
||||
for A OR B we got : asdf
|
||||
for string C we got : fdas
|
||||
for string D we got : 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# success
|
||||
../examples/test5 -a asdf -c fdas --eee blah --ddd > tmp.out 2>&1
|
||||
../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test33.out; then
|
||||
exit 0
|
||||
|
@ -2,8 +2,8 @@
|
||||
USAGE:
|
||||
|
||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||
<string>|-g <string>} [--ddd] -c <string> [--] [-v]
|
||||
[-h]
|
||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
||||
... } [--ddd] -c <string> [--] [-v] [-h]
|
||||
|
||||
|
||||
Where:
|
||||
@ -25,6 +25,13 @@ Where:
|
||||
(OR required) (value required) g test
|
||||
|
||||
|
||||
-i <string>, --iii <string> (accepted multiple times)
|
||||
(OR required) (value required) or test i
|
||||
-- OR --
|
||||
-j <string>, --jjj <string> (accepted multiple times)
|
||||
(OR required) (value required) or test j
|
||||
|
||||
|
||||
--ddd
|
||||
d test
|
||||
|
||||
|
11
tests/test57.out
Normal file
11
tests/test57.out
Normal file
@ -0,0 +1,11 @@
|
||||
PARSE ERROR:
|
||||
Too many arguments!
|
||||
|
||||
Brief USAGE:
|
||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
||||
... } [--ddd] -c <string> [--] [-v] [-h]
|
||||
|
||||
For complete USAGE and HELP type:
|
||||
../examples/test5 --help
|
||||
|
11
tests/test57.sh
Executable file
11
tests/test57.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# failure
|
||||
../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test57.out; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user