code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/sh # success ../examples/test2 -i 10 -s hello goodbye -ABC > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test6.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test25.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether we can parse args from # a vector of strings and that combined switch # handling doesn't get fooled if the delimiter # is in the string # success ../examples/test13 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test68.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test7 -n mike 2 1 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test38.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test11 -v "1 2 3" > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test64.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test8 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test54.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 -b asdf -c fdas -g asdf -j homer > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test21.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 10 -s hello goodbye -ABC > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test6.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test3 --stringTest=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test13.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test3 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test31.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test6 -n homer 2 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test34.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 --version > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test8.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test21 ~~reverse /n mike > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test78.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test8 -s=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test47.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test11 -v "1 2 3" > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test64.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test3 --stringTest one homer -B -Bh > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test16.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure validates that the correct error message # is displayed for XOR'd args ../examples/test20 -ab > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test77.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test2 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test62.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure # This used to fail on the "Too many arguments!" but now fails sooner, # and on a more approriate error. ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test57.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test12 -v "a 1 0.3" > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test67.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether we can parse args from # a vector of strings and that combined switch # handling doesn't get fooled if the delimiter # is in the string # success ../examples/test13 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test68.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test7 -n homer 2 -n marge 1 3 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test37.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test25.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test11 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test63.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 10 -s hello -i 9 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test11.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -s=one homer -B > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test51.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test9 -VVV -N --noise -r blah > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test59.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test3 --stringTest=aaa homer marge bart -- one two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test14.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 10 -s hello goodbye -hABC > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test7.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test1 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test40.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 1 - -s fdsa one two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test56.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test8 -s=aaa homer marge bart -- one two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test48.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test7 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test46.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 2 -f 4..2 -s asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test26.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test9 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test58.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test6 -n mike 2 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test35.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure validates that the correct error message # is displayed for XOR'd args ../examples/test20 -b -a > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test75.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test3 --stringTest=asdf - asdf zero one > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test55.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # Checks that parsing exceptions are properly # propagated to the caller. ../examples/test18 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test70.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test3 --stringTest=one homer -B > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test17.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test6 -n homer 6 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test36.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success test hex ../examples/test19 -i 0xA > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test71.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success tests whether * in UnlabeledValueArg passes ../examples/test2 -i 1 -s asdf fff*fff > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test73.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test1 -n mike > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test2.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test3 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test32.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test5 -d junk -c fdas > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test23.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test3 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test42.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success test octal ../examples/test19 -i 012 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test72.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test1 -r -n mike > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test1.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test44.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test1 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test4.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 -a asdf -c fdas --eee blah -i sss -i fdsf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test20.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test7 2 -n homer -n bart 6 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test39.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # 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 if cmp -s tmp.out $srcdir/test29.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 10 -s hello > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test10.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/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
Shell
#!/bin/sh # failure ../examples/test2 -i 10 -s hello -f nine > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test12.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test12 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test66.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 2.1 -f 4.2 -s asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test30.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 2 -f 4.0.2 -s asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test27.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test7 -n mike 2 1 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test38.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure validates that the correct error message # is displayed for XOR'd args ../examples/test20 -a -b > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test74.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests a bug in handling of - chars in Unlabeled args # success ../examples/test2 -i 10 -s hello "-1 -1" > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test61.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 10 -s homer marge bart lisa > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test5.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 2a -f 4.2 -s asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test28.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test33.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -s bbb homer marge bart -- -hv two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test49.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test4 -BA --Bs asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test19.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -s one homer -B -Bh > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test50.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 10 -s hello goodbye -- -hv one two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test9.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test5 -a fdsa -b asdf -c fdas > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test22.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test41.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test5 --aaa dilbert -b asdf -c fdas > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test24.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test1 -n mike -r > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test3.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test4 -Bs --Bs asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test18.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure validates that the correct error message # is displayed for XOR'd args ../examples/test20 -ba > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test76.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test3 --stringTest bbb homer marge bart -- -hv two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test15.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test53.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test9 -VVV -N --noise -rr > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test60.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test6 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test45.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test4 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test43.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test52.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # Checks that parsing exceptions are properly # propagated to the caller. ../examples/test18 --bob > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test69.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test12 -v "a 1 0.3" > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test67.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test4 -Bs --Bs asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test18.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test7 -n homer 2 -n marge 1 3 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test37.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure validates that the correct error message # is displayed for XOR'd args ../examples/test20 -ba > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test76.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 1 - -s fdsa one two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test56.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/test12 > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test66.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test2 -i 10 -s homer marge bart lisa > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test5.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # 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 if cmp -s tmp.out $srcdir/test29.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test3 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test31.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test4 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test43.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test2 -i 2a -f 4.2 -s asdf asdf > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test28.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test1 --help > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test40.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -s bbb homer marge bart -- -hv two > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test49.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # success ../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test33.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # this tests whether all required args are listed as # missing when no arguments are specified # failure ../examples/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
Shell
#!/bin/sh # success ../examples/test2 -i 10 -s hello goodbye -hABC > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test7.out; then exit 0 else exit 1 fi
Shell
#!/bin/sh # failure ../examples/test8 -s=one homer -B > tmp.out 2>&1 if cmp -s tmp.out $srcdir/test51.out; then exit 0 else exit 1 fi
Shell