From 9a7d0a01918df5a963b6c90177b321ff743282b2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 11 Aug 2017 02:37:48 +0200 Subject: shell: add OPTARG poisoning to getopt_optarg.tests ash fails this! Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-getopts/getopt_optarg.tests | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-getopts/getopt_optarg.tests b/shell/hush_test/hush-getopts/getopt_optarg.tests index b346284f0..33682e868 100755 --- a/shell/hush_test/hush-getopts/getopt_optarg.tests +++ b/shell/hush_test/hush-getopts/getopt_optarg.tests @@ -4,6 +4,7 @@ var=QWERTY OPTARG=ASDFGH while getopts "w:et" var; do echo "var:'$var' OPTIND:$OPTIND OPTARG:'$OPTARG'" + OPTARG=ASDFGH done echo "exited: var:'$var' OPTIND:$OPTIND OPTARG:'$OPTARG'" @@ -12,5 +13,6 @@ echo "*** OPTIND=0, optstring:'w:et' args:$*" OPTIND=0 while getopts "w:et" var; do echo "var:'$var' OPTIND:$OPTIND OPTARG:'$OPTARG'" + OPTARG=ASDFGH done echo "exited: var:'$var' OPTIND:$OPTIND OPTARG:'$OPTARG'" -- cgit v1.2.3