diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-12 13:06:02 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-12 13:06:02 -0800 |
commit | b7fc9e0f6d6105ba2203f219743d4b269415e84b (patch) | |
tree | ef6586dfc62798c2b17487b443864699aca55f31 /tests/getopts.right | |
download | vyatta-bash-b7fc9e0f6d6105ba2203f219743d4b269415e84b.tar.gz vyatta-bash-b7fc9e0f6d6105ba2203f219743d4b269415e84b.zip |
initial import from bash_3.1dfsg.orig.tar.gz
Diffstat (limited to 'tests/getopts.right')
-rw-r--r-- | tests/getopts.right | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/getopts.right b/tests/getopts.right new file mode 100644 index 0000000..9226103 --- /dev/null +++ b/tests/getopts.right @@ -0,0 +1,56 @@ +getopts: usage: getopts optstring name [arg] +2 +getopts: usage: getopts optstring name [arg] +2 +./getopts.tests: line 10: getopts: -a: invalid option +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 +./getopts1.sub: option requires an argument -- b +Usage: ./getopts1.sub [-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 +./getopts4.sub: error: option `b' requires an argument +Usage: ./getopts4.sub [-a] [-b value] args +./getopts4.sub: error: illegal option character `c' +Usage: ./getopts4.sub [-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 +./getopts5.sub: illegal option -- c +something else here +./getopts5.sub: illegal option -- d +something else here +./getopts5.sub: 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 +./getopts7.sub: line 4: getopts: `opt-var': not a valid identifier +remaining args: |