summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-getopts
diff options
context:
space:
mode:
authorDenys Vlasenko2017-08-11 02:37:48 +0200
committerDenys Vlasenko2017-08-11 02:37:48 +0200
commit9a7d0a01918df5a963b6c90177b321ff743282b2 (patch)
tree3378d6ce2ad70e7bc34423bd59ca49e5e9aa1304 /shell/ash_test/ash-getopts
parent81f962f3df0d7194b7a52c6f83259727759094c4 (diff)
downloadbusybox-9a7d0a01918df5a963b6c90177b321ff743282b2.zip
busybox-9a7d0a01918df5a963b6c90177b321ff743282b2.tar.gz
shell: add OPTARG poisoning to getopt_optarg.tests
ash fails this! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-getopts')
-rwxr-xr-xshell/ash_test/ash-getopts/getopt_optarg.tests2
1 files changed, 2 insertions, 0 deletions
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 @@ 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'"