Simplify tests by using common test script.

This reduces duplicated checking logic between each test and makes it easier
to run and check result of individual tests.
This commit is contained in:
Daniel Aarno 2018-07-30 18:06:25 +01:00
parent eb877b0fab
commit 1dcad08845
78 changed files with 79 additions and 704 deletions

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 10 -s hello > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello
if cmp -s tmp.out $srcdir/test10.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 10 -s hello -i 9 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello -i 9
if cmp -s tmp.out $srcdir/test11.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 10 -s hello -f nine > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello -f nine
if cmp -s tmp.out $srcdir/test12.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test3 --stringTest=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --stringTest=bill -i=9 -i=8 -B homer marge bart
if cmp -s tmp.out $srcdir/test13.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test3 --stringTest=aaa homer marge bart -- one two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --stringTest=aaa homer marge bart -- one two
if cmp -s tmp.out $srcdir/test14.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test3 --stringTest bbb homer marge bart -- -hv two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --stringTest bbb homer marge bart -- -hv two
if cmp -s tmp.out $srcdir/test15.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test3 --stringTest one homer -B -Bh > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --stringTest one homer -B -Bh
if cmp -s tmp.out $srcdir/test16.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test3 --stringTest=one homer -B > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --stringTest=one homer -B
if cmp -s tmp.out $srcdir/test17.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test4 -Bs --Bs asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test4 -Bs --Bs asdf
if cmp -s tmp.out $srcdir/test18.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test4 -BA --Bs asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test4 -BA --Bs asdf
if cmp -s tmp.out $srcdir/test19.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test1 -n mike > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test1 -n mike
if cmp -s tmp.out $srcdir/test2.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test5 -a asdf -c fdas --eee blah -i sss -i fdsf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 -a asdf -c fdas --eee blah -i sss -i fdsf
if cmp -s tmp.out $srcdir/test20.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test5 -b asdf -c fdas -g asdf -j homer > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 -b asdf -c fdas -g asdf -j homer
if cmp -s tmp.out $srcdir/test21.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test5 -a fdsa -b asdf -c fdas > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 -a fdsa -b asdf -c fdas
if cmp -s tmp.out $srcdir/test22.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test5 -d junk -c fdas > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 -d junk -c fdas
if cmp -s tmp.out $srcdir/test23.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test5 --aaa dilbert -b asdf -c fdas > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 --aaa dilbert -b asdf -c fdas
if cmp -s tmp.out $srcdir/test24.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 --aaa asdf -c fdas --fff blah -i one -i two
if cmp -s tmp.out $srcdir/test25.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 2 -f 4..2 -s asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 2 -f 4..2 -s asdf asdf
if cmp -s tmp.out $srcdir/test26.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 2 -f 4.0.2 -s asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 2 -f 4.0.2 -s asdf asdf
if cmp -s tmp.out $srcdir/test27.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 2a -f 4.2 -s asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 2a -f 4.2 -s asdf asdf
if cmp -s tmp.out $srcdir/test28.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure... no hex here, but see test19.cpp for how to use hex # failure... no hex here, but see test19.cpp for how to use hex
../examples/test2 -i 0xA -f 4.2 -s asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 0xA -f 4.2 -s asdf asdf
if cmp -s tmp.out $srcdir/test29.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test1 -n mike -r > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test1 -n mike -r
if cmp -s tmp.out $srcdir/test3.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test2 -i 2.1 -f 4.2 -s asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 2.1 -f 4.2 -s asdf asdf
if cmp -s tmp.out $srcdir/test30.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test3 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 -i=9a -i=1 -s=asdf asdf asdf
if cmp -s tmp.out $srcdir/test31.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test3 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 -f=9 -f=1.0.0 -s=asdf asdf asdf
if cmp -s tmp.out $srcdir/test32.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t
if cmp -s tmp.out $srcdir/test33.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test6 -n homer 2 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test6 -n homer 2
if cmp -s tmp.out $srcdir/test34.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test6 -n mike 2 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test6 -n mike 2
if cmp -s tmp.out $srcdir/test35.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test6 -n homer 6 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test6 -n homer 6
if cmp -s tmp.out $srcdir/test36.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test7 -n homer 2 -n marge 1 3 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test7 -n homer 2 -n marge 1 3
if cmp -s tmp.out $srcdir/test37.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test7 -n mike 2 1 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test7 -n mike 2 1
if cmp -s tmp.out $srcdir/test38.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test7 2 -n homer -n bart 6 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test7 2 -n homer -n bart 6
if cmp -s tmp.out $srcdir/test39.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test1 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test1
if cmp -s tmp.out $srcdir/test4.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test1 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test1 --help
if cmp -s tmp.out $srcdir/test40.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 --help
if cmp -s tmp.out $srcdir/test41.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test3 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --help
if cmp -s tmp.out $srcdir/test42.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test4 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test4 --help
if cmp -s tmp.out $srcdir/test43.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test5 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 --help
if cmp -s tmp.out $srcdir/test44.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test6 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test6 --help
if cmp -s tmp.out $srcdir/test45.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test7 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test7 --help
if cmp -s tmp.out $srcdir/test46.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test8 -s=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -s=bill -i=9 -i=8 -B homer marge bart
if cmp -s tmp.out $srcdir/test47.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test8 -s=aaa homer marge bart -- one two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -s=aaa homer marge bart -- one two
if cmp -s tmp.out $srcdir/test48.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test8 -s bbb homer marge bart -- -hv two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -s bbb homer marge bart -- -hv two
if cmp -s tmp.out $srcdir/test49.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 -i 10 -s homer marge bart lisa > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s homer marge bart lisa
if cmp -s tmp.out $srcdir/test5.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test8 -s one homer -B -Bh > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -s one homer -B -Bh
if cmp -s tmp.out $srcdir/test50.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test8 -s=one homer -B > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -s=one homer -B
if cmp -s tmp.out $srcdir/test51.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test8 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -i=9a -i=1 -s=asdf asdf asdf
if cmp -s tmp.out $srcdir/test52.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test8 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 -f=9 -f=1.0.0 -s=asdf asdf asdf
if cmp -s tmp.out $srcdir/test53.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test8 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test8 --help
if cmp -s tmp.out $srcdir/test54.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test3 --stringTest=asdf - asdf zero one > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test3 --stringTest=asdf - asdf zero one
if cmp -s tmp.out $srcdir/test55.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 -i 1 - -s fdsa one two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 1 - -s fdsa one two
if cmp -s tmp.out $srcdir/test56.out; then
exit 0
else
exit 1
fi

View File

@ -1,13 +1,5 @@
#!/bin/sh #!/bin/sh
# failure # failure
# This used to fail on the "Too many arguments!" but now fails sooner, # This used to fail on the "Too many arguments!" but now fails sooner,
# and on a more approriate error. # and on a more approriate error.
../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh
if cmp -s tmp.out $srcdir/test57.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test9 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test9
if cmp -s tmp.out $srcdir/test58.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test9 -VVV -N --noise -r blah > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test9 -VVV -N --noise -r blah
if cmp -s tmp.out $srcdir/test59.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 -i 10 -s hello goodbye -ABC > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello goodbye -ABC
if cmp -s tmp.out $srcdir/test6.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# failure # failure
../examples/test9 -VVV -N --noise -rr > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test9 -VVV -N --noise -rr
if cmp -s tmp.out $srcdir/test60.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# this tests a bug in handling of - chars in Unlabeled args # this tests a bug in handling of - chars in Unlabeled args
# success # success
../examples/test2 -i 10 -s hello "-1 -1" > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello "-1 -1"
if cmp -s tmp.out $srcdir/test61.out; then
exit 0
else
exit 1
fi

View File

@ -1,13 +1,5 @@
#!/bin/sh #!/bin/sh
# this tests whether all required args are listed as # this tests whether all required args are listed as
# missing when no arguments are specified # missing when no arguments are specified
# failure # failure
../examples/test2 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2
if cmp -s tmp.out $srcdir/test62.out; then
exit 0
else
exit 1
fi

View File

@ -1,13 +1,5 @@
#!/bin/sh #!/bin/sh
# this tests whether all required args are listed as # this tests whether all required args are listed as
# missing when no arguments are specified # missing when no arguments are specified
# failure # failure
../examples/test11 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test11
if cmp -s tmp.out $srcdir/test63.out; then
exit 0
else
exit 1
fi

View File

@ -1,13 +1,5 @@
#!/bin/sh #!/bin/sh
# this tests whether all required args are listed as # this tests whether all required args are listed as
# missing when no arguments are specified # missing when no arguments are specified
# failure # failure
../examples/test11 -v "1 2 3" > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test11 -v "1 2 3"
if cmp -s tmp.out $srcdir/test64.out; then
exit 0
else
exit 1
fi

View File

@ -1,14 +1,5 @@
#!/bin/sh #!/bin/sh
# this tests whether all required args are listed as # this tests whether all required args are listed as
# missing when no arguments are specified # missing when no arguments are specified
# failure # failure
../examples/test12 -v "1 2 3" -v "4 5 6" -v "7 8 9" -v "-1 0.2 0.4" \ ./simple-test.sh `basename $0 .sh` test12 -v "1 2 3" -v "4 5 6" -v "7 8 9" -v "-1 0.2 0.4"
> tmp.out 2>&1
if cmp -s tmp.out $srcdir/test65.out; then
exit 0
else
exit 1
fi

View File

@ -1,13 +1,5 @@
#!/bin/sh #!/bin/sh
# this tests whether all required args are listed as # this tests whether all required args are listed as
# missing when no arguments are specified # missing when no arguments are specified
# failure # failure
../examples/test12 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test12
if cmp -s tmp.out $srcdir/test66.out; then
exit 0
else
exit 1
fi

View File

@ -1,13 +1,5 @@
#!/bin/sh #!/bin/sh
# this tests whether all required args are listed as # this tests whether all required args are listed as
# missing when no arguments are specified # missing when no arguments are specified
# failure # failure
../examples/test12 -v "a 1 0.3" > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test12 -v "a 1 0.3"
if cmp -s tmp.out $srcdir/test67.out; then
exit 0
else
exit 1
fi

View File

@ -1,15 +1,7 @@
#!/bin/sh #!/bin/sh
# this tests whether we can parse args from # this tests whether we can parse args from
# a vector of strings and that combined switch # a vector of strings and that combined switch
# handling doesn't get fooled if the delimiter # handling doesn't get fooled if the delimiter
# is in the string # is in the string
# success # success
../examples/test13 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test13
if cmp -s tmp.out $srcdir/test68.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# Checks that parsing exceptions are properly # Checks that parsing exceptions are properly
# propagated to the caller. # propagated to the caller.
../examples/test18 --bob > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test18 --bob
if cmp -s tmp.out $srcdir/test69.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 -i 10 -s hello goodbye -hABC > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello goodbye -hABC
if cmp -s tmp.out $srcdir/test7.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# Checks that parsing exceptions are properly # Checks that parsing exceptions are properly
# propagated to the caller. # propagated to the caller.
../examples/test18 --help > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test18 --help
if cmp -s tmp.out $srcdir/test70.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success test hex # success test hex
../examples/test19 -i 0xA > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test19 -i 0xA
if cmp -s tmp.out $srcdir/test71.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success test octal # success test octal
../examples/test19 -i 012 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test19 -i 012
if cmp -s tmp.out $srcdir/test72.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success tests whether * in UnlabeledValueArg passes # success tests whether * in UnlabeledValueArg passes
../examples/test2 -i 1 -s asdf fff*fff > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 1 -s asdf fff*fff
if cmp -s tmp.out $srcdir/test73.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# failure validates that the correct error message # failure validates that the correct error message
# is displayed for XOR'd args # is displayed for XOR'd args
../examples/test20 -a -b > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test20 -a -b
if cmp -s tmp.out $srcdir/test74.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# failure validates that the correct error message # failure validates that the correct error message
# is displayed for XOR'd args # is displayed for XOR'd args
../examples/test20 -b -a > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test20 -b -a
if cmp -s tmp.out $srcdir/test75.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# failure validates that the correct error message # failure validates that the correct error message
# is displayed for XOR'd args # is displayed for XOR'd args
../examples/test20 -ba > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test20 -ba
if cmp -s tmp.out $srcdir/test76.out; then
exit 0
else
exit 1
fi

View File

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
# failure validates that the correct error message # failure validates that the correct error message
# is displayed for XOR'd args # is displayed for XOR'd args
../examples/test20 -ab > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test20 -ab
if cmp -s tmp.out $srcdir/test77.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test21 ~~reverse /n mike > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test21 ~~reverse /n mike
if cmp -s tmp.out $srcdir/test78.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test21 > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test21
if cmp -s tmp.out $srcdir/test79.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 --version > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 --version
if cmp -s tmp.out $srcdir/test8.out; then
exit 0
else
exit 1
fi

View File

@ -1,11 +1,3 @@
#!/bin/sh #!/bin/sh
# success # success
../examples/test2 -i 10 -s hello goodbye -- -hv one two > tmp.out 2>&1 ./simple-test.sh `basename $0 .sh` test2 -i 10 -s hello goodbye -- -hv one two
if cmp -s tmp.out $srcdir/test9.out; then
exit 0
else
exit 1
fi