shell: add OPTARG poisoning to getopt_optarg.tests
ash fails this!
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/shell/ash_test/ash-getopts/getopt_optarg.tests b/shell/ash_test/ash-getopts/getopt_optarg.tests
index b346284..33682e8 100755
--- a/shell/ash_test/ash-getopts/getopt_optarg.tests
+++ b/shell/ash_test/ash-getopts/getopt_optarg.tests
@@ -4,6 +4,7 @@
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 @@
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'"