aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-getopts/getopt_simple.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-13 02:59:00 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-13 02:59:00 +0200
commit007ce9f807c99e14799c6579c8d06f422eccfcb2 (patch)
treee45e06ff46a7737a0553245d4fb397997705aff7 /shell/hush_test/hush-getopts/getopt_simple.tests
parent419db0391e47444dd12fb052613fd415694d04f0 (diff)
downloadbusybox-007ce9f807c99e14799c6579c8d06f422eccfcb2.tar.gz
shell: tweak getopts tests, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-getopts/getopt_simple.tests')
-rwxr-xr-xshell/hush_test/hush-getopts/getopt_simple.tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/hush_test/hush-getopts/getopt_simple.tests b/shell/hush_test/hush-getopts/getopt_simple.tests
index 8615ae366..50718cc98 100755
--- a/shell/hush_test/hush-getopts/getopt_simple.tests
+++ b/shell/hush_test/hush-getopts/getopt_simple.tests
@@ -10,6 +10,8 @@
# We check that loop does not stop on unknown option (sets "?"),
# stops on _first_ non-option argument.
+(
+
echo "*** no OPTIND, optstring:'ab' args:-a -b c"
var=QWERTY
while getopts "ab" var -a -b c; do
@@ -73,3 +75,7 @@ while getopts "ab" var -a -c -b d; do
echo "var:'$var' OPTIND:$OPTIND"
done
echo "exited: rc:$? var:'$var' OPTIND:$OPTIND"
+
+) 2>&1 \
+| sed -e 's/ unrecognized option: / invalid option -- /' \
+ -e 's/ illegal option -- / invalid option -- /' \