From 007ce9f807c99e14799c6579c8d06f422eccfcb2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 13 Aug 2017 02:59:00 +0200 Subject: shell: tweak getopts tests, no code changes Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-getopts/getopt_positional.tests | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shell/hush_test/hush-getopts/getopt_positional.tests') diff --git a/shell/hush_test/hush-getopts/getopt_positional.tests b/shell/hush_test/hush-getopts/getopt_positional.tests index ddf063363..20716bb0c 100755 --- a/shell/hush_test/hush-getopts/getopt_positional.tests +++ b/shell/hush_test/hush-getopts/getopt_positional.tests @@ -1,3 +1,5 @@ +( + set -- -q -w -e r -t -y echo "*** no OPTIND, optstring:'we' args:$*" var=QWERTY @@ -5,3 +7,7 @@ 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 -- /' \ -- cgit v1.2.3