Imported from ../bash-2.01.tar.gz.
This commit is contained in:
parent
ccc6cda312
commit
d166f04881
304 changed files with 14702 additions and 13012 deletions
56
tests/getopts.right
Normal file
56
tests/getopts.right
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
getopts: usage: getopts optstring name [arg]
|
||||
2
|
||||
getopts: usage: getopts optstring name [arg]
|
||||
2
|
||||
./getopts.tests: getopts: illegal option: -a
|
||||
getopts: usage: getopts optstring name [arg]
|
||||
-a specified
|
||||
-b bval specified
|
||||
remaining args: one two three
|
||||
-a specified
|
||||
-b bval specified
|
||||
remaining args: one two three four five six seven eight nine ten eleven twelve
|
||||
./getopts.sub1: option requires an argument -- b
|
||||
Usage: ./getopts.sub1 [-a] [-b value] args
|
||||
-a specified
|
||||
-c cval specified
|
||||
-d specified
|
||||
-a specified
|
||||
-b 3 specified
|
||||
remaining args: one two three four five
|
||||
-a specified
|
||||
-b bval specified
|
||||
remaining args: one two three
|
||||
-a specified
|
||||
-b bval specified
|
||||
remaining args: one two three
|
||||
./getopts.sub4: error: option `b' requires an argument
|
||||
Usage: ./getopts.sub4 [-a] [-b value] args
|
||||
./getopts.sub4: error: illegal option character `c'
|
||||
Usage: ./getopts.sub4 [-a] [-b value] args
|
||||
-a specified
|
||||
remaining args: -b bval one two three
|
||||
OPTERR=0
|
||||
a here
|
||||
something else here
|
||||
OPTIND=3
|
||||
getop: OPTERR=1
|
||||
a here
|
||||
./getopts.sub5: illegal option -- c
|
||||
something else here
|
||||
./getopts.sub5: illegal option -- d
|
||||
something else here
|
||||
./getopts.sub5: illegal option -- e
|
||||
something else here
|
||||
getop: OPTIND=5
|
||||
OPTIND=3
|
||||
OPTERR=0
|
||||
-a specified
|
||||
remaining args:
|
||||
-a specified
|
||||
remaining args:
|
||||
-a specified
|
||||
remaining args:
|
||||
0
|
||||
./getopts.sub7: getopts: `opt-var': not a valid identifier
|
||||
remaining args:
|
||||
Loading…
Add table
Add a link
Reference in a new issue