summaryrefslogtreecommitdiffstats
path: root/bin/sh/tests/builtins/getopts1.0
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2016-04-09 16:06:13 +0000
committerjilles <jilles@FreeBSD.org>2016-04-09 16:06:13 +0000
commit8c8069ff15ec4563a7ca9d91a07748e0fd5a5a67 (patch)
treebbd1633d34def4e58032ded7110db992a7b7060b /bin/sh/tests/builtins/getopts1.0
parent872f9979ca66f9de4958fee179e93aadf7de7dd8 (diff)
downloadFreeBSD-src-8c8069ff15ec4563a7ca9d91a07748e0fd5a5a67.zip
FreeBSD-src-8c8069ff15ec4563a7ca9d91a07748e0fd5a5a67.tar.gz
sh: Fix some unquoted variables in tests.
The builtins/getopts1.0 test failed if a single-character file existed in the current directory.
Diffstat (limited to 'bin/sh/tests/builtins/getopts1.0')
-rw-r--r--bin/sh/tests/builtins/getopts1.08
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/tests/builtins/getopts1.0 b/bin/sh/tests/builtins/getopts1.0
index 64763bc..10d2b59 100644
--- a/bin/sh/tests/builtins/getopts1.0
+++ b/bin/sh/tests/builtins/getopts1.0
@@ -3,7 +3,7 @@
printf -- '-1-\n'
set -- -abc
getopts "ab:" OPTION
-echo ${OPTION}
+printf '%s\n' "${OPTION}"
# In this case 'getopts' should realize that we have not provided the
# required argument for "-b".
@@ -14,12 +14,12 @@ echo ${OPTION}
printf -- '-2-\n'
set -- -ab
getopts "ab:" OPTION
-echo ${OPTION}
+printf '%s\n' "${OPTION}"
getopts "ab:" OPTION 3>&2 2>&1 >&3 3>&-
-echo ${OPTION}
+printf '%s\n' "${OPTION}"
# The 'shift' is aimed at causing an error.
printf -- '-3-\n'
shift 1
getopts "ab:" OPTION
-echo ${OPTION}
+printf '%s\n' "${OPTION}"
OpenPOWER on IntegriCloud