aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bash_completion_test.sh
diff options
context:
space:
mode:
authorGravatar Androbin <robin.richtsfeld@gmail.com>2017-11-29 01:31:47 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-11-29 01:33:24 -0800
commit9c78a79c02d38a98a38d852e10b16d8cb7a59c91 (patch)
treea9af77a8a9c2dc588705351d64941596bfc8b89f /scripts/bash_completion_test.sh
parentff62e1d0edf65d5103dde914db780f9c10371b92 (diff)
Various Shell Script Fixes and Improvements - Part One
see #4023 Closes #4051. PiperOrigin-RevId: 177279457
Diffstat (limited to 'scripts/bash_completion_test.sh')
-rwxr-xr-xscripts/bash_completion_test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/bash_completion_test.sh b/scripts/bash_completion_test.sh
index 3bf7999d71..adb75f7149 100755
--- a/scripts/bash_completion_test.sh
+++ b/scripts/bash_completion_test.sh
@@ -68,7 +68,7 @@ expand() {
#
# Alias expansion still inserts an extra space after 'blaze',
# though, hence the following sed. Not sure why.
- for i in ${COMMAND_ALIASES[@]}; do
+ for i in "${COMMAND_ALIASES[@]}"; do
echo "alias $i=\"echo $i'\""
done
echo -en "$input'"
@@ -82,7 +82,7 @@ expand() {
# e.g. assert_expansion 'foo' 'foo_expand' 'flag1=bar;flag2=baz'
assert_expansion() {
local prefix=$1 expected=$2 flags=${3:-}
- for i in ${COMMAND_ALIASES[@]}; do
+ for i in "${COMMAND_ALIASES[@]}"; do
local nprefix="$i $prefix"
local nexpected="$i $expected"
assert_equals "$nexpected" "$(expand "$nprefix\t" "$flags" "/dev/null")"
@@ -100,7 +100,7 @@ assert_expansion() {
assert_expansion_error_not_contains() {
local prefix=$1 not_expected=$2 flags=${3:-}
local temp_file="$(mktemp "${TEST_TMPDIR}/tmp.stderr.XXXXXX")"
- for i in ${COMMAND_ALIASES[@]}; do
+ for i in "${COMMAND_ALIASES[@]}"; do
local nprefix="$i "
expand "$nprefix\t" "$flags" "$temp_file" > /dev/null
assert_not_contains "$not_expected" "$temp_file"