aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/tests/builtins
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2016-04-11 15:24:59 +0000
committerGlen Barber <gjb@FreeBSD.org>2016-04-11 15:24:59 +0000
commit876d357fa7bc8aeb8d050dd8fe227dd4fd8ed4df (patch)
treef5194d1ce3fa45b67cf63080fc519fec83abc57a /bin/sh/tests/builtins
parent7a888f325e494860d6158821dfbcef85a3310783 (diff)
parentb2d7040c1cc76c5bbbf54cd2351b4d137b8c22b6 (diff)
Notes
Diffstat (limited to 'bin/sh/tests/builtins')
-rw-r--r--bin/sh/tests/builtins/getopts1.08
-rw-r--r--bin/sh/tests/builtins/getopts2.02
-rw-r--r--bin/sh/tests/builtins/getopts9.04
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/sh/tests/builtins/getopts1.0 b/bin/sh/tests/builtins/getopts1.0
index 64763bc462c1..10d2b59208e5 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}"
diff --git a/bin/sh/tests/builtins/getopts2.0 b/bin/sh/tests/builtins/getopts2.0
index 5a5dbe20cb6a..1bd2c32db81c 100644
--- a/bin/sh/tests/builtins/getopts2.0
+++ b/bin/sh/tests/builtins/getopts2.0
@@ -3,4 +3,4 @@ set - -ax
getopts ax option
set -C
getopts ax option
-echo $option
+printf '%s\n' "$option"
diff --git a/bin/sh/tests/builtins/getopts9.0 b/bin/sh/tests/builtins/getopts9.0
index d23fc432af97..1c35fc68c2d1 100644
--- a/bin/sh/tests/builtins/getopts9.0
+++ b/bin/sh/tests/builtins/getopts9.0
@@ -2,8 +2,8 @@
args='-ab'
getopts ab opt $args
-echo $?:$opt:$OPTARG
+printf '%s\n' "$?:$opt:$OPTARG"
for dummy in dummy1 dummy2; do
getopts ab opt $args
- echo $?:$opt:$OPTARG
+ printf '%s\n' "$?:$opt:$OPTARG"
done