diff options
Diffstat (limited to 'tests/getopts10.sub')
-rw-r--r-- | tests/getopts10.sub | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/getopts10.sub b/tests/getopts10.sub new file mode 100644 index 0000000..84bacf8 --- /dev/null +++ b/tests/getopts10.sub @@ -0,0 +1,17 @@ +set -- -a bb +readonly OPTARG +getopts :x x + +echo OPTARG = $OPTARG x = $x + +getopts x x +echo ${OPTARG-unset} x = $x + +typeset -r RO=foo +typeset -n OPTARG=RO + +getopts :x x +typeset -p RO + +getopts x x +typeset -p RO |