busybox/shell/hush_test/hush-getopts/getopt_positional.tests
Denys Vlasenko 007ce9f807 shell: tweak getopts tests, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-13 02:59:00 +02:00

14 lines
310 B
Plaintext
Executable File

(
set -- -q -w -e r -t -y
echo "*** no OPTIND, optstring:'we' args:$*"
var=QWERTY
while getopts "we" var; do
echo "var:'$var' OPTIND:$OPTIND"
done
echo "exited: var:'$var' OPTIND:$OPTIND"
) 2>&1 \
| sed -e 's/ unrecognized option: / invalid option -- /' \
-e 's/ illegal option -- / invalid option -- /' \