freebsd-skq/bin/sh/tests/builtins/getopts9.0
Jilles Tjoelker 4a9f41ec82 sh: Fix some unquoted variables in tests.
The builtins/getopts1.0 test failed if a single-character file existed in
the current directory.
2016-04-09 16:06:13 +00:00

10 lines
168 B
Plaintext

# $FreeBSD$
args='-ab'
getopts ab opt $args
printf '%s\n' "$?:$opt:$OPTARG"
for dummy in dummy1 dummy2; do
getopts ab opt $args
printf '%s\n' "$?:$opt:$OPTARG"
done