8 # maybe someday we will have a ksh93-like -a argument to set the name
9 # used in error messages, but not yet
12 ${THIS_SH} ./getopts1.sub -a -b bval one two three
13 # make sure getopts works when there are more than 9 positional parameters
14 ${THIS_SH} ./getopts1.sub -a -b bval one two three four five six seven eight nine ten eleven twelve
15 ${THIS_SH} ./getopts1.sub -a -b
17 ${THIS_SH} ./getopts2.sub -ad -c cval three four five
19 ${THIS_SH} ./getopts3.sub
21 # make sure that `-b bval' and `-bbval' are equivalent
22 ${THIS_SH} ./getopts4.sub -a -b bval one two three
23 ${THIS_SH} ./getopts4.sub -a -bbval one two three
24 # this tests `silent' error reporting
25 ${THIS_SH} ./getopts4.sub -a -b
26 ${THIS_SH} ./getopts4.sub -a -c
28 # make sure that `--' can be used to end the list of options
29 ${THIS_SH} ./getopts4.sub -a -- -b bval one two three
31 ${THIS_SH} ./getopts5.sub -a -c
33 ${THIS_SH} ./getopts6.sub -a
34 ${THIS_SH} ./getopts6.sub -a -c
35 ${THIS_SH} ./getopts6.sub -ac
36 echo $? # this should be 2
38 ${THIS_SH} ./getopts7.sub -a