mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-07 19:29:07 -04:00
tests for MultiSwitchArg
This commit is contained in:
parent
4921db78a1
commit
00e2f3eb7e
@ -56,7 +56,10 @@ TESTS = test1.sh \
|
||||
test54.sh \
|
||||
test55.sh \
|
||||
test56.sh \
|
||||
test57.sh
|
||||
test57.sh \
|
||||
test58.sh \
|
||||
test59.sh \
|
||||
test60.sh
|
||||
|
||||
EXTRA_DIST = $(TESTS) \
|
||||
test1.out \
|
||||
@ -115,5 +118,8 @@ EXTRA_DIST = $(TESTS) \
|
||||
test54.out \
|
||||
test55.out \
|
||||
test56.out \
|
||||
test57.out
|
||||
test57.out \
|
||||
test58.out \
|
||||
test59.out \
|
||||
test60.out
|
||||
|
||||
|
1
tests/test58.out
Normal file
1
tests/test58.out
Normal file
@ -0,0 +1 @@
|
||||
FORWARD
|
11
tests/test58.sh
Executable file
11
tests/test58.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# success
|
||||
../examples/test9 > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test58.out; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
3
tests/test59.out
Normal file
3
tests/test59.out
Normal file
@ -0,0 +1,3 @@
|
||||
REVERSE
|
||||
Verbose level: 3
|
||||
Noise level: 7
|
11
tests/test59.sh
Executable file
11
tests/test59.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# success
|
||||
../examples/test9 -VVV -N --noise -r > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test59.out; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
26
tests/test60.out
Normal file
26
tests/test60.out
Normal file
@ -0,0 +1,26 @@
|
||||
PARSE ERROR: Argument: -r (--reverse)
|
||||
Argument already set!
|
||||
|
||||
|
||||
USAGE:
|
||||
|
||||
../examples/test9 [-N] ... [-V] ... [-r] [--]
|
||||
|
||||
|
||||
Where:
|
||||
|
||||
-N, --noise (accepted multiple times)
|
||||
Level of noise
|
||||
|
||||
-V, --verbose (accepted multiple times)
|
||||
Level of verbosity
|
||||
|
||||
-r, --reverse
|
||||
REVERSE instead of FORWARDS
|
||||
|
||||
--, --ignore_rest
|
||||
Ignores the rest of the labeled arguments following this flag.
|
||||
|
||||
|
||||
Command description message
|
||||
|
11
tests/test60.sh
Executable file
11
tests/test60.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# failure
|
||||
../examples/test9 -VVV -N --noise -rr > tmp.out 2>&1
|
||||
|
||||
if cmp -s tmp.out test60.out; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user