bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Avoid DoS vulnerability through unsafe default assignment


From: Bruno Haible
Subject: Avoid DoS vulnerability through unsafe default assignment
Date: Sat, 23 Jul 2022 12:06:21 +0200

I started to run shellcheck on the shell scripts in gnulib.

This patch fixes occurrences of https://www.shellcheck.net/wiki/SC2223 .

The command to perform the substitution on a file f is
  sed -i -e 's/: [$][{]\([^{}=]*=[^{}=]*\)[}]$/: "\${\1}"/' "$f"


2022-07-23  Bruno Haible  <bruno@clisp.org>

        Avoid DoS vulnerability through unsafe default assignment.
        See https://www.shellcheck.net/wiki/SC2223 .
        * MODULES.html.sh (func_tmpdir): Surround default assignment with
        double-quotes.
        * build-aux/bootstrap: Likewise.
        * build-aux/csharpcomp.sh.in (func_tmpdir): Likewise.
        * build-aux/gendocs.sh: Likewise.
        * build-aux/libtool-next-version (func_tmpdir): Likewise.
        * config/srclist-update: Likewise.
        * gnulib-tool (func_tmpdir): Likewise.
        * posix-modules (func_tmpdir): Likewise.
        * tests/test-atexit.sh: Likewise.
        * tests/test-btoc32-1.sh: Likewise.
        * tests/test-btoc32-2.sh: Likewise.
        * tests/test-btowc1.sh: Likewise.
        * tests/test-btowc2.sh: Likewise.
        * tests/test-c-dtoastr.sh: Likewise.
        * tests/test-c-ldtoastr.sh: Likewise.
        * tests/test-c-snprintf.sh: Likewise.
        * tests/test-c-strcase.sh: Likewise.
        * tests/test-c-vasprintf.sh: Likewise.
        * tests/test-c-vsnprintf.sh: Likewise.
        * tests/test-c-xvasprintf.sh: Likewise.
        * tests/test-c32isalnum.sh: Likewise.
        * tests/test-c32isalpha.sh: Likewise.
        * tests/test-c32isblank.sh: Likewise.
        * tests/test-c32iscntrl.sh: Likewise.
        * tests/test-c32isdigit.sh: Likewise.
        * tests/test-c32isgraph.sh: Likewise.
        * tests/test-c32islower.sh: Likewise.
        * tests/test-c32isprint.sh: Likewise.
        * tests/test-c32ispunct.sh: Likewise.
        * tests/test-c32isspace.sh: Likewise.
        * tests/test-c32isupper.sh: Likewise.
        * tests/test-c32isxdigit.sh: Likewise.
        * tests/test-c32rtomb.sh: Likewise.
        * tests/test-c32snrtombs-1.sh: Likewise.
        * tests/test-c32snrtombs-2.sh: Likewise.
        * tests/test-c32snrtombs-3.sh: Likewise.
        * tests/test-c32snrtombs-4.sh: Likewise.
        * tests/test-c32srtombs-1.sh: Likewise.
        * tests/test-c32srtombs-2.sh: Likewise.
        * tests/test-c32srtombs-3.sh: Likewise.
        * tests/test-c32srtombs-4.sh: Likewise.
        * tests/test-c32stombs-1.sh: Likewise.
        * tests/test-c32stombs-2.sh: Likewise.
        * tests/test-c32stombs-3.sh: Likewise.
        * tests/test-c32stombs-4.sh: Likewise.
        * tests/test-closein.sh: Likewise.
        * tests/test-copy-acl.sh (func_tmpdir): Likewise.
        * tests/test-copy-file.sh (func_tmpdir): Likewise.
        * tests/test-dprintf-posix.sh: Likewise.
        * tests/test-execl.sh: Likewise.
        * tests/test-execle.sh: Likewise.
        * tests/test-execlp.sh: Likewise.
        * tests/test-execv.sh: Likewise.
        * tests/test-execve.sh: Likewise.
        * tests/test-execvp.sh: Likewise.
        * tests/test-execvpe.sh: Likewise.
        * tests/test-file-has-acl.sh (func_tmpdir): Likewise.
        * tests/test-fprintf-posix.sh: Likewise.
        * tests/test-init.sh: Likewise.
        * tests/test-iswdigit.sh: Likewise.
        * tests/test-iswxdigit.sh: Likewise.
        * tests/test-mbmemcasecmp1.sh: Likewise.
        * tests/test-mbmemcasecmp2.sh: Likewise.
        * tests/test-mbmemcasecmp3.sh: Likewise.
        * tests/test-mbmemcasecoll1.sh: Likewise.
        * tests/test-mbmemcasecoll2.sh: Likewise.
        * tests/test-mbmemcasecoll3.sh: Likewise.
        * tests/test-mbrtoc32-1.sh: Likewise.
        * tests/test-mbrtoc32-2.sh: Likewise.
        * tests/test-mbrtoc32-3.sh: Likewise.
        * tests/test-mbrtoc32-4.sh: Likewise.
        * tests/test-mbrtowc1.sh: Likewise.
        * tests/test-mbrtowc2.sh: Likewise.
        * tests/test-mbrtowc3.sh: Likewise.
        * tests/test-mbrtowc4.sh: Likewise.
        * tests/test-mbscasecmp.sh: Likewise.
        * tests/test-mbscasestr2.sh: Likewise.
        * tests/test-mbscasestr3.sh: Likewise.
        * tests/test-mbscasestr4.sh: Likewise.
        * tests/test-mbschr.sh: Likewise.
        * tests/test-mbscspn.sh: Likewise.
        * tests/test-mbsinit.sh: Likewise.
        * tests/test-mbsncasecmp.sh: Likewise.
        * tests/test-mbsnrtoc32s-1.sh: Likewise.
        * tests/test-mbsnrtoc32s-2.sh: Likewise.
        * tests/test-mbsnrtoc32s-3.sh: Likewise.
        * tests/test-mbsnrtoc32s-4.sh: Likewise.
        * tests/test-mbsnrtowcs1.sh: Likewise.
        * tests/test-mbsnrtowcs2.sh: Likewise.
        * tests/test-mbsnrtowcs3.sh: Likewise.
        * tests/test-mbsnrtowcs4.sh: Likewise.
        * tests/test-mbspbrk.sh: Likewise.
        * tests/test-mbspcasecmp.sh: Likewise.
        * tests/test-mbsrchr.sh: Likewise.
        * tests/test-mbsrtoc32s-1.sh: Likewise.
        * tests/test-mbsrtoc32s-2.sh: Likewise.
        * tests/test-mbsrtoc32s-3.sh: Likewise.
        * tests/test-mbsrtoc32s-4.sh: Likewise.
        * tests/test-mbsrtowcs1.sh: Likewise.
        * tests/test-mbsrtowcs2.sh: Likewise.
        * tests/test-mbsrtowcs3.sh: Likewise.
        * tests/test-mbsrtowcs4.sh: Likewise.
        * tests/test-mbsspn.sh: Likewise.
        * tests/test-mbsstr2.sh: Likewise.
        * tests/test-mbsstr3.sh: Likewise.
        * tests/test-mbstoc32s-1.sh: Likewise.
        * tests/test-mbstoc32s-2.sh: Likewise.
        * tests/test-mbstoc32s-3.sh: Likewise.
        * tests/test-mbstoc32s-4.sh: Likewise.
        * tests/test-nl_langinfo.sh: Likewise.
        * tests/test-parse-duration.sh (func_tmpdir): Likewise.
        * tests/test-perror.sh: Likewise.
        * tests/test-printf-posix.sh: Likewise.
        * tests/test-set-mode-acl.sh (func_tmpdir): Likewise.
        * tests/test-setlocale1.sh: Likewise.
        * tests/test-strtod1.sh: Likewise.
        * tests/test-strtold1.sh: Likewise.
        * tests/test-unicodeio2.sh: Likewise.
        * tests/test-unicodeio3.sh: Likewise.
        * tests/test-vasnprintf-posix2.sh: Likewise.
        * tests/test-vc-list-files-cvs.sh: Likewise.
        * tests/test-vc-list-files-git.sh: Likewise.
        * tests/test-vdprintf-posix.sh: Likewise.
        * tests/test-vfprintf-posix.sh: Likewise.
        * tests/test-vprintf-posix.sh: Likewise.
        * tests/test-wcrtomb.sh: Likewise.
        * tests/test-wcsnrtombs1.sh: Likewise.
        * tests/test-wcsnrtombs2.sh: Likewise.
        * tests/test-wcsnrtombs3.sh: Likewise.
        * tests/test-wcsnrtombs4.sh: Likewise.
        * tests/test-wcsrtombs1.sh: Likewise.
        * tests/test-wcsrtombs2.sh: Likewise.
        * tests/test-wcsrtombs3.sh: Likewise.
        * tests/test-wcsrtombs4.sh: Likewise.
        * tests/test-xprintf-posix.sh: Likewise.
        * tests/test-xstrtoimax.sh: Likewise.
        * tests/test-xstrtol.sh: Likewise.
        * tests/test-xstrtoll.sh: Likewise.
        * tests/test-xstrtoumax.sh: Likewise.
        * tests/test-yesno.sh: Likewise.
        * tests/unicase/test-locale-language.sh: Likewise.
        * tests/unicase/test-ulc-casecmp1.sh: Likewise.
        * tests/unicase/test-ulc-casecmp2.sh: Likewise.
        * tests/unicase/test-ulc-casecoll1.sh: Likewise.
        * tests/unicase/test-ulc-casecoll2.sh: Likewise.
        * tests/unigbrk/test-ulc-grapheme-breaks.sh: Likewise.
        * tests/unistdio/test-u16-vasnprintf2.sh: Likewise.
        * tests/unistdio/test-u16-vasnprintf3.sh: Likewise.
        * tests/unistdio/test-u32-vasnprintf2.sh: Likewise.
        * tests/unistdio/test-u32-vasnprintf3.sh: Likewise.
        * tests/unistdio/test-u8-vasnprintf2.sh: Likewise.
        * tests/unistdio/test-u8-vasnprintf3.sh: Likewise.
        * tests/unistdio/test-ulc-vasnprintf2.sh: Likewise.
        * tests/unistdio/test-ulc-vasnprintf3.sh: Likewise.
        * tests/uniwbrk/test-ulc-wordbreaks.sh: Likewise.
        * tests/uniwidth/test-uc_width2.sh: Likewise.

diff --git a/MODULES.html.sh b/MODULES.html.sh
index 6fcad8b994..246d8ebf52 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -1378,7 +1378,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 7ebd5b4b05..76bda0836c 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -160,8 +160,8 @@ gnulib_modules=
 # Any gnulib files needed that are not in modules.
 gnulib_files=
 
-: ${AUTOPOINT=autopoint}
-: ${AUTORECONF=autoreconf}
+: "${AUTOPOINT=autopoint}"
+: "${AUTORECONF=autoreconf}"
 
 # A function to be called for each unrecognized option.  Returns 0 if
 # the option in $1 has been processed by the function.  Returns 1 if
diff --git a/build-aux/csharpcomp.sh.in b/build-aux/csharpcomp.sh.in
index eaa343460e..1a690e0a7a 100644
--- a/build-aux/csharpcomp.sh.in
+++ b/build-aux/csharpcomp.sh.in
@@ -42,7 +42,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 8dbac3021a..5068582925 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -41,14 +41,14 @@ 
scripturl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.
 
templateurl="https://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template";
 
 : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
-: ${MAKEINFO="makeinfo"}
-: ${TEXI2DVI="texi2dvi"}
-: ${DOCBOOK2HTML="docbook2html"}
-: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2TXT="docbook2txt"}
-: ${GENDOCS_TEMPLATE_DIR="."}
-: ${PERL='perl'}
-: ${TEXI2HTML="texi2html"}
+: "${MAKEINFO="makeinfo"}"
+: "${TEXI2DVI="texi2dvi"}"
+: "${DOCBOOK2HTML="docbook2html"}"
+: "${DOCBOOK2PDF="docbook2pdf"}"
+: "${DOCBOOK2TXT="docbook2txt"}"
+: "${GENDOCS_TEMPLATE_DIR="."}"
+: "${PERL='perl'}"
+: "${TEXI2HTML="texi2html"}"
 unset CDPATH
 unset use_texi2html
 
diff --git a/build-aux/libtool-next-version b/build-aux/libtool-next-version
index 21f704ba9d..119552c6ac 100755
--- a/build-aux/libtool-next-version
+++ b/build-aux/libtool-next-version
@@ -98,7 +98,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/config/srclist-update b/config/srclist-update
index 0ef9796d54..05fb0a592b 100755
--- a/config/srclist-update
+++ b/config/srclist-update
@@ -48,7 +48,7 @@ fi
 verbose=false
 #chicken="echo (would)"
 
-: ${TMPDIR=/tmp}
+: "${TMPDIR=/tmp}"
 dsttmp=$TMPDIR/srclist.dst
 
 # Source `dirname $0`/srclistvars.sh first, if it exists.
diff --git a/gnulib-tool b/gnulib-tool
index 5993143f3c..2a971de9ea 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -500,7 +500,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/posix-modules b/posix-modules
index b3831c9fb5..4629161571 100755
--- a/posix-modules
+++ b/posix-modules
@@ -172,7 +172,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/tests/test-atexit.sh b/tests/test-atexit.sh
index d2d0489b9f..1b6a20798e 100755
--- a/tests/test-atexit.sh
+++ b/tests/test-atexit.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 # Check that an atexit handler is called when main() returns normally.
diff --git a/tests/test-btoc32-1.sh b/tests/test-btoc32-1.sh
index ce860ae594..42a479845f 100755
--- a/tests/test-btoc32-1.sh
+++ b/tests/test-btoc32-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-btoc32-2.sh b/tests/test-btoc32-2.sh
index b9cdb99446..3a7b267ee7 100755
--- a/tests/test-btoc32-2.sh
+++ b/tests/test-btoc32-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-btowc1.sh b/tests/test-btowc1.sh
index ab4b287682..e51e1c5c5e 100755
--- a/tests/test-btowc1.sh
+++ b/tests/test-btowc1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-btowc2.sh b/tests/test-btowc2.sh
index d7d4d9cc38..9f38f4e8ae 100755
--- a/tests/test-btowc2.sh
+++ b/tests/test-btowc2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-c-dtoastr.sh b/tests/test-c-dtoastr.sh
index ef0e459b47..e95d0adf61 100644
--- a/tests/test-c-dtoastr.sh
+++ b/tests/test-c-dtoastr.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c-ldtoastr.sh b/tests/test-c-ldtoastr.sh
index ad7a32a14f..25c69c7aaf 100644
--- a/tests/test-c-ldtoastr.sh
+++ b/tests/test-c-ldtoastr.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c-snprintf.sh b/tests/test-c-snprintf.sh
index 732911c309..8e28c0c249 100755
--- a/tests/test-c-snprintf.sh
+++ b/tests/test-c-snprintf.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c-strcase.sh b/tests/test-c-strcase.sh
index 14bdfb248a..9f491e0f96 100755
--- a/tests/test-c-strcase.sh
+++ b/tests/test-c-strcase.sh
@@ -5,14 +5,14 @@ ${CHECKER} ./test-c-strcasecmp${EXEEXT} || exit 1
 ${CHECKER} ./test-c-strncasecmp${EXEEXT} || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strcasecmp${EXEEXT} locale || exit 1
   LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strncasecmp${EXEEXT} locale || exit 1
 fi
 
 # Test in a Turkish UTF-8 locale.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 != none; then
   LC_ALL=$LOCALE_TR_UTF8 ${CHECKER} ./test-c-strcasecmp${EXEEXT} locale || 
exit 1
   LC_ALL=$LOCALE_TR_UTF8 ${CHECKER} ./test-c-strncasecmp${EXEEXT} locale || 
exit 1
diff --git a/tests/test-c-vasprintf.sh b/tests/test-c-vasprintf.sh
index 3f6579aafc..d7c478d502 100755
--- a/tests/test-c-vasprintf.sh
+++ b/tests/test-c-vasprintf.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c-vsnprintf.sh b/tests/test-c-vsnprintf.sh
index 5c06aa0262..c566b709dd 100755
--- a/tests/test-c-vsnprintf.sh
+++ b/tests/test-c-vsnprintf.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c-xvasprintf.sh b/tests/test-c-xvasprintf.sh
index ba32418f18..b6d7f2396f 100755
--- a/tests/test-c-xvasprintf.sh
+++ b/tests/test-c-xvasprintf.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c32isalnum.sh b/tests/test-c32isalnum.sh
index 747c98f2ef..9c8ec4223b 100755
--- a/tests/test-c32isalnum.sh
+++ b/tests/test-c32isalnum.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isalnum${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isalnum${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isalnum${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isalnum${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isalnum${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isalnum${EXEEXT} 4 \
diff --git a/tests/test-c32isalpha.sh b/tests/test-c32isalpha.sh
index 737bfb61ce..994ac3d8aa 100755
--- a/tests/test-c32isalpha.sh
+++ b/tests/test-c32isalpha.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isalpha${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isalpha${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isalpha${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isalpha${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isalpha${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isalpha${EXEEXT} 4 \
diff --git a/tests/test-c32isblank.sh b/tests/test-c32isblank.sh
index 2fde5c6a39..023dfc4829 100755
--- a/tests/test-c32isblank.sh
+++ b/tests/test-c32isblank.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isblank${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isblank${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isblank${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isblank${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isblank${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isblank${EXEEXT} 4 \
diff --git a/tests/test-c32iscntrl.sh b/tests/test-c32iscntrl.sh
index b9a1dd6066..555b4de632 100755
--- a/tests/test-c32iscntrl.sh
+++ b/tests/test-c32iscntrl.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32iscntrl${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32iscntrl${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32iscntrl${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32iscntrl${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32iscntrl${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32iscntrl${EXEEXT} 4 \
diff --git a/tests/test-c32isdigit.sh b/tests/test-c32isdigit.sh
index df63077bce..6033defc98 100755
--- a/tests/test-c32isdigit.sh
+++ b/tests/test-c32isdigit.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isdigit${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isdigit${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isdigit${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isdigit${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isdigit${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isdigit${EXEEXT} 4 \
diff --git a/tests/test-c32isgraph.sh b/tests/test-c32isgraph.sh
index 8f176d078c..4541aee263 100755
--- a/tests/test-c32isgraph.sh
+++ b/tests/test-c32isgraph.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isgraph${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isgraph${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isgraph${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isgraph${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isgraph${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isgraph${EXEEXT} 4 \
diff --git a/tests/test-c32islower.sh b/tests/test-c32islower.sh
index 4dc6e53fba..a88602ad5a 100755
--- a/tests/test-c32islower.sh
+++ b/tests/test-c32islower.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32islower${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32islower${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32islower${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32islower${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32islower${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32islower${EXEEXT} 4 \
diff --git a/tests/test-c32isprint.sh b/tests/test-c32isprint.sh
index 788d28ce1b..1d8d455d75 100755
--- a/tests/test-c32isprint.sh
+++ b/tests/test-c32isprint.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isprint${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isprint${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isprint${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isprint${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isprint${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isprint${EXEEXT} 4 \
diff --git a/tests/test-c32ispunct.sh b/tests/test-c32ispunct.sh
index 9e7ef36c0e..b0a5870959 100755
--- a/tests/test-c32ispunct.sh
+++ b/tests/test-c32ispunct.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32ispunct${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32ispunct${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32ispunct${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32ispunct${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32ispunct${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32ispunct${EXEEXT} 4 \
diff --git a/tests/test-c32isspace.sh b/tests/test-c32isspace.sh
index 7304489079..730b9b7253 100755
--- a/tests/test-c32isspace.sh
+++ b/tests/test-c32isspace.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isspace${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isspace${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isspace${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isspace${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isspace${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isspace${EXEEXT} 4 \
diff --git a/tests/test-c32isupper.sh b/tests/test-c32isupper.sh
index 77064f1d2d..da5fcab22a 100755
--- a/tests/test-c32isupper.sh
+++ b/tests/test-c32isupper.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isupper${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isupper${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isupper${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isupper${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isupper${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isupper${EXEEXT} 4 \
diff --git a/tests/test-c32isxdigit.sh b/tests/test-c32isxdigit.sh
index b2dd321052..e78109bdb4 100755
--- a/tests/test-c32isxdigit.sh
+++ b/tests/test-c32isxdigit.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-c32isxdigit${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-c32isxdigit${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32isxdigit${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32isxdigit${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32isxdigit${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32isxdigit${EXEEXT} 4 \
diff --git a/tests/test-c32rtomb.sh b/tests/test-c32rtomb.sh
index 2899297bea..d2b091968b 100755
--- a/tests/test-c32rtomb.sh
+++ b/tests/test-c32rtomb.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-c32rtomb${EXEEXT} 1 \
@@ -9,7 +9,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-c32rtomb${EXEEXT} 2 \
@@ -17,7 +17,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-c32rtomb${EXEEXT} 3 \
@@ -25,7 +25,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-c32rtomb${EXEEXT} 4 \
diff --git a/tests/test-c32snrtombs-1.sh b/tests/test-c32snrtombs-1.sh
index 608c6d1876..8a03302337 100755
--- a/tests/test-c32snrtombs-1.sh
+++ b/tests/test-c32snrtombs-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c32snrtombs-2.sh b/tests/test-c32snrtombs-2.sh
index 5b437f1bb4..97840cf983 100755
--- a/tests/test-c32snrtombs-2.sh
+++ b/tests/test-c32snrtombs-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-c32snrtombs-3.sh b/tests/test-c32snrtombs-3.sh
index bd77bf4186..44c9b91859 100755
--- a/tests/test-c32snrtombs-3.sh
+++ b/tests/test-c32snrtombs-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-c32snrtombs-4.sh b/tests/test-c32snrtombs-4.sh
index 33322977a4..6de78a284b 100755
--- a/tests/test-c32snrtombs-4.sh
+++ b/tests/test-c32snrtombs-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-c32srtombs-1.sh b/tests/test-c32srtombs-1.sh
index 4228174622..faa3e409bf 100755
--- a/tests/test-c32srtombs-1.sh
+++ b/tests/test-c32srtombs-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c32srtombs-2.sh b/tests/test-c32srtombs-2.sh
index c0dd1720bb..9a8bafed0f 100755
--- a/tests/test-c32srtombs-2.sh
+++ b/tests/test-c32srtombs-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-c32srtombs-3.sh b/tests/test-c32srtombs-3.sh
index 7e59e8648a..dc15550e47 100755
--- a/tests/test-c32srtombs-3.sh
+++ b/tests/test-c32srtombs-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-c32srtombs-4.sh b/tests/test-c32srtombs-4.sh
index 97f76a8dc0..e83f13ef51 100755
--- a/tests/test-c32srtombs-4.sh
+++ b/tests/test-c32srtombs-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-c32stombs-1.sh b/tests/test-c32stombs-1.sh
index ea63e9aca3..f0e57c2ca5 100755
--- a/tests/test-c32stombs-1.sh
+++ b/tests/test-c32stombs-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-c32stombs-2.sh b/tests/test-c32stombs-2.sh
index 573a92f073..7eb7ce3120 100755
--- a/tests/test-c32stombs-2.sh
+++ b/tests/test-c32stombs-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-c32stombs-3.sh b/tests/test-c32stombs-3.sh
index c3c91e7829..db5706144a 100755
--- a/tests/test-c32stombs-3.sh
+++ b/tests/test-c32stombs-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-c32stombs-4.sh b/tests/test-c32stombs-4.sh
index ae3b13015e..14ca450b4f 100755
--- a/tests/test-c32stombs-4.sh
+++ b/tests/test-c32stombs-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-closein.sh b/tests/test-closein.sh
index d6359f9f64..7d0fb919dc 100755
--- a/tests/test-closein.sh
+++ b/tests/test-closein.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 echo Hello world > in.tmp
diff --git a/tests/test-copy-acl.sh b/tests/test-copy-acl.sh
index 9f69d14373..50beba05d3 100755
--- a/tests/test-copy-acl.sh
+++ b/tests/test-copy-acl.sh
@@ -18,7 +18,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/tests/test-copy-file.sh b/tests/test-copy-file.sh
index f58a66e9a5..9cd9e2093d 100755
--- a/tests/test-copy-file.sh
+++ b/tests/test-copy-file.sh
@@ -12,7 +12,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/tests/test-dprintf-posix.sh b/tests/test-dprintf-posix.sh
index 7353713f2a..188ebe5592 100755
--- a/tests/test-dprintf-posix.sh
+++ b/tests/test-dprintf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-dprintf-posix.tmp t-dprintf-posix.out"
 ${CHECKER} ./test-dprintf-posix${EXEEXT} > t-dprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-dprintf-posix.tmp > t-dprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-dprintf-posix.out
 result=$?
 
diff --git a/tests/test-execl.sh b/tests/test-execl.sh
index ed36bf8ff0..74ab56f452 100755
--- a/tests/test-execl.sh
+++ b/tests/test-execl.sh
@@ -38,7 +38,7 @@ argv[9] = |foo|
 argv[10] = ||
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execl.ok test-execl.out
 result=$?
 
diff --git a/tests/test-execle.sh b/tests/test-execle.sh
index 95999f29fd..c5a3c8b571 100755
--- a/tests/test-execle.sh
+++ b/tests/test-execle.sh
@@ -39,7 +39,7 @@ argv[10] = ||
 Hommingberg = |Gepardenforelle|
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execle.ok test-execle.out
 result=$?
 
diff --git a/tests/test-execlp.sh b/tests/test-execlp.sh
index 1a0885d2cc..f1c38d0d30 100755
--- a/tests/test-execlp.sh
+++ b/tests/test-execlp.sh
@@ -41,7 +41,7 @@ argv[9] = |foo|
 argv[10] = ||
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execlp.ok test-execlp.out
 result=$?
 
diff --git a/tests/test-execv.sh b/tests/test-execv.sh
index f99c723a19..ca4a0bf87e 100755
--- a/tests/test-execv.sh
+++ b/tests/test-execv.sh
@@ -38,7 +38,7 @@ argv[9] = |foo|
 argv[10] = ||
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execv.ok test-execv.out
 result=$?
 
diff --git a/tests/test-execve.sh b/tests/test-execve.sh
index 1a452330b9..51b2802ad2 100755
--- a/tests/test-execve.sh
+++ b/tests/test-execve.sh
@@ -39,7 +39,7 @@ argv[10] = ||
 Hommingberg = |Gepardenforelle|
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execve.ok test-execve.out
 result=$?
 
diff --git a/tests/test-execvp.sh b/tests/test-execvp.sh
index db99913c5c..b04c445afe 100755
--- a/tests/test-execvp.sh
+++ b/tests/test-execvp.sh
@@ -41,7 +41,7 @@ argv[9] = |foo|
 argv[10] = ||
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execvp.ok test-execvp.out
 result=$?
 
diff --git a/tests/test-execvpe.sh b/tests/test-execvpe.sh
index c62ee71c4b..f1afa12968 100755
--- a/tests/test-execvpe.sh
+++ b/tests/test-execvpe.sh
@@ -42,7 +42,7 @@ argv[10] = ||
 Hommingberg = |Gepardenforelle|
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} test-execvpe.ok test-execvpe.out
 result=$?
 
diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh
index 09d18da4eb..9e723b89ba 100755
--- a/tests/test-file-has-acl.sh
+++ b/tests/test-file-has-acl.sh
@@ -18,7 +18,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/tests/test-fprintf-posix.sh b/tests/test-fprintf-posix.sh
index 2a49c87931..5391ee0b7b 100755
--- a/tests/test-fprintf-posix.sh
+++ b/tests/test-fprintf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-fprintf-posix.tmp t-fprintf-posix.out"
 ${CHECKER} ./test-fprintf-posix${EXEEXT} > t-fprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-fprintf-posix.tmp > t-fprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-fprintf-posix.out
 result=$?
 
diff --git a/tests/test-init.sh b/tests/test-init.sh
index 75ebaf0fe8..cac46f71b5 100755
--- a/tests/test-init.sh
+++ b/tests/test-init.sh
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 fail=0
diff --git a/tests/test-iswdigit.sh b/tests/test-iswdigit.sh
index 1bde6026e8..142a224f08 100755
--- a/tests/test-iswdigit.sh
+++ b/tests/test-iswdigit.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-iswdigit${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-iswdigit${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-iswdigit${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-iswdigit${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-iswdigit${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-iswdigit${EXEEXT} 4 \
diff --git a/tests/test-iswxdigit.sh b/tests/test-iswxdigit.sh
index f5454388c5..9bdaff4ad1 100755
--- a/tests/test-iswxdigit.sh
+++ b/tests/test-iswxdigit.sh
@@ -5,7 +5,7 @@ LC_ALL=C     ${CHECKER} ./test-iswxdigit${EXEEXT} 0 || exit 1
 LC_ALL=POSIX ${CHECKER} ./test-iswxdigit${EXEEXT} 0 || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 1 \
@@ -13,7 +13,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 2 \
@@ -21,7 +21,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 3 \
@@ -29,7 +29,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-iswxdigit${EXEEXT} 4 \
diff --git a/tests/test-mbmemcasecmp1.sh b/tests/test-mbmemcasecmp1.sh
index 0eeb980fce..af9ff764ee 100755
--- a/tests/test-mbmemcasecmp1.sh
+++ b/tests/test-mbmemcasecmp1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbmemcasecmp2.sh b/tests/test-mbmemcasecmp2.sh
index be03caa9eb..61d321443f 100755
--- a/tests/test-mbmemcasecmp2.sh
+++ b/tests/test-mbmemcasecmp2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbmemcasecmp3.sh b/tests/test-mbmemcasecmp3.sh
index 4adafe6b81..b847774821 100755
--- a/tests/test-mbmemcasecmp3.sh
+++ b/tests/test-mbmemcasecmp3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/tests/test-mbmemcasecoll1.sh b/tests/test-mbmemcasecoll1.sh
index 12dd3cf234..073eab90c8 100755
--- a/tests/test-mbmemcasecoll1.sh
+++ b/tests/test-mbmemcasecoll1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbmemcasecoll2.sh b/tests/test-mbmemcasecoll2.sh
index f3fef3d2f7..995f3f72a8 100755
--- a/tests/test-mbmemcasecoll2.sh
+++ b/tests/test-mbmemcasecoll2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbmemcasecoll3.sh b/tests/test-mbmemcasecoll3.sh
index 7578752729..f4f2995e54 100755
--- a/tests/test-mbmemcasecoll3.sh
+++ b/tests/test-mbmemcasecoll3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/tests/test-mbrtoc32-1.sh b/tests/test-mbrtoc32-1.sh
index d22a29091a..03b29fdcaa 100755
--- a/tests/test-mbrtoc32-1.sh
+++ b/tests/test-mbrtoc32-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbrtoc32-2.sh b/tests/test-mbrtoc32-2.sh
index 3b429db914..9e538ebb77 100755
--- a/tests/test-mbrtoc32-2.sh
+++ b/tests/test-mbrtoc32-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbrtoc32-3.sh b/tests/test-mbrtoc32-3.sh
index 2d79c568c7..cb36fd2caa 100755
--- a/tests/test-mbrtoc32-3.sh
+++ b/tests/test-mbrtoc32-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbrtoc32-4.sh b/tests/test-mbrtoc32-4.sh
index 05e617f4f9..7f21dbcb4e 100755
--- a/tests/test-mbrtoc32-4.sh
+++ b/tests/test-mbrtoc32-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-mbrtowc1.sh b/tests/test-mbrtowc1.sh
index 00b108bc44..2b6eaf99c9 100755
--- a/tests/test-mbrtowc1.sh
+++ b/tests/test-mbrtowc1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbrtowc2.sh b/tests/test-mbrtowc2.sh
index 5036930e9e..6868e86371 100755
--- a/tests/test-mbrtowc2.sh
+++ b/tests/test-mbrtowc2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbrtowc3.sh b/tests/test-mbrtowc3.sh
index 2773fa7b81..eca8d648d3 100755
--- a/tests/test-mbrtowc3.sh
+++ b/tests/test-mbrtowc3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbrtowc4.sh b/tests/test-mbrtowc4.sh
index 92f641c87c..7da23a3cab 100755
--- a/tests/test-mbrtowc4.sh
+++ b/tests/test-mbrtowc4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-mbscasecmp.sh b/tests/test-mbscasecmp.sh
index 5201951d5f..73e62b5f50 100755
--- a/tests/test-mbscasecmp.sh
+++ b/tests/test-mbscasecmp.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/tests/test-mbscasestr2.sh b/tests/test-mbscasestr2.sh
index a09258bc7c..3322fb0e26 100755
--- a/tests/test-mbscasestr2.sh
+++ b/tests/test-mbscasestr2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbscasestr3.sh b/tests/test-mbscasestr3.sh
index b0cd31db17..b016c5002a 100755
--- a/tests/test-mbscasestr3.sh
+++ b/tests/test-mbscasestr3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no chinese GB18030 locale is installed"
diff --git a/tests/test-mbscasestr4.sh b/tests/test-mbscasestr4.sh
index bbec0b2c27..176deb52a8 100755
--- a/tests/test-mbscasestr4.sh
+++ b/tests/test-mbscasestr4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/tests/test-mbschr.sh b/tests/test-mbschr.sh
index 7b04fe31a3..7e62b3f08a 100755
--- a/tests/test-mbschr.sh
+++ b/tests/test-mbschr.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no chinese GB18030 locale is installed"
diff --git a/tests/test-mbscspn.sh b/tests/test-mbscspn.sh
index 230fd59d1c..7dd37e3e3c 100755
--- a/tests/test-mbscspn.sh
+++ b/tests/test-mbscspn.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsinit.sh b/tests/test-mbsinit.sh
index 7308714cf6..25d4b2e482 100755
--- a/tests/test-mbsinit.sh
+++ b/tests/test-mbsinit.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsncasecmp.sh b/tests/test-mbsncasecmp.sh
index 2863616a7a..baf1e542bd 100755
--- a/tests/test-mbsncasecmp.sh
+++ b/tests/test-mbsncasecmp.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/tests/test-mbsnrtoc32s-1.sh b/tests/test-mbsnrtoc32s-1.sh
index 0e353f2105..e33a90be64 100755
--- a/tests/test-mbsnrtoc32s-1.sh
+++ b/tests/test-mbsnrtoc32s-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbsnrtoc32s-2.sh b/tests/test-mbsnrtoc32s-2.sh
index d3529fa300..c402683e79 100755
--- a/tests/test-mbsnrtoc32s-2.sh
+++ b/tests/test-mbsnrtoc32s-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsnrtoc32s-3.sh b/tests/test-mbsnrtoc32s-3.sh
index 6eb5c25ce1..afdfea9fb5 100755
--- a/tests/test-mbsnrtoc32s-3.sh
+++ b/tests/test-mbsnrtoc32s-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbsnrtoc32s-4.sh b/tests/test-mbsnrtoc32s-4.sh
index 2e1d090845..4399f1ea1c 100755
--- a/tests/test-mbsnrtoc32s-4.sh
+++ b/tests/test-mbsnrtoc32s-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-mbsnrtowcs1.sh b/tests/test-mbsnrtowcs1.sh
index 960e67ebf7..8797e9f300 100755
--- a/tests/test-mbsnrtowcs1.sh
+++ b/tests/test-mbsnrtowcs1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbsnrtowcs2.sh b/tests/test-mbsnrtowcs2.sh
index 7c01a59b87..21860dacef 100755
--- a/tests/test-mbsnrtowcs2.sh
+++ b/tests/test-mbsnrtowcs2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsnrtowcs3.sh b/tests/test-mbsnrtowcs3.sh
index 669157ebbb..aa8f1910a0 100755
--- a/tests/test-mbsnrtowcs3.sh
+++ b/tests/test-mbsnrtowcs3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbsnrtowcs4.sh b/tests/test-mbsnrtowcs4.sh
index 25f0575ea1..a65f1eb0a9 100755
--- a/tests/test-mbsnrtowcs4.sh
+++ b/tests/test-mbsnrtowcs4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-mbspbrk.sh b/tests/test-mbspbrk.sh
index a992316ece..23c422656f 100755
--- a/tests/test-mbspbrk.sh
+++ b/tests/test-mbspbrk.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbspcasecmp.sh b/tests/test-mbspcasecmp.sh
index d9ae094fe6..1e390755f1 100755
--- a/tests/test-mbspcasecmp.sh
+++ b/tests/test-mbspcasecmp.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific Turkish locale is installed.
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no turkish Unicode locale is installed"
diff --git a/tests/test-mbsrchr.sh b/tests/test-mbsrchr.sh
index 4970ded629..84c40b7bf8 100755
--- a/tests/test-mbsrchr.sh
+++ b/tests/test-mbsrchr.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no chinese GB18030 locale is installed"
diff --git a/tests/test-mbsrtoc32s-1.sh b/tests/test-mbsrtoc32s-1.sh
index c957b80f47..d71f37cd5a 100755
--- a/tests/test-mbsrtoc32s-1.sh
+++ b/tests/test-mbsrtoc32s-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbsrtoc32s-2.sh b/tests/test-mbsrtoc32s-2.sh
index bb893d17b5..ea7168f111 100755
--- a/tests/test-mbsrtoc32s-2.sh
+++ b/tests/test-mbsrtoc32s-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsrtoc32s-3.sh b/tests/test-mbsrtoc32s-3.sh
index 5573412829..4f4c649af7 100755
--- a/tests/test-mbsrtoc32s-3.sh
+++ b/tests/test-mbsrtoc32s-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbsrtoc32s-4.sh b/tests/test-mbsrtoc32s-4.sh
index faf46001b7..253725b7c2 100755
--- a/tests/test-mbsrtoc32s-4.sh
+++ b/tests/test-mbsrtoc32s-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-mbsrtowcs1.sh b/tests/test-mbsrtowcs1.sh
index 66ba231a0e..f8c54ab243 100755
--- a/tests/test-mbsrtowcs1.sh
+++ b/tests/test-mbsrtowcs1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbsrtowcs2.sh b/tests/test-mbsrtowcs2.sh
index 6786efd7df..1cae31cb1f 100755
--- a/tests/test-mbsrtowcs2.sh
+++ b/tests/test-mbsrtowcs2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsrtowcs3.sh b/tests/test-mbsrtowcs3.sh
index 54e983267f..908c140e57 100755
--- a/tests/test-mbsrtowcs3.sh
+++ b/tests/test-mbsrtowcs3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbsrtowcs4.sh b/tests/test-mbsrtowcs4.sh
index 8acda0853a..135bc5f719 100755
--- a/tests/test-mbsrtowcs4.sh
+++ b/tests/test-mbsrtowcs4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-mbsspn.sh b/tests/test-mbsspn.sh
index aa7c97dcee..efc344c553 100755
--- a/tests/test-mbsspn.sh
+++ b/tests/test-mbsspn.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsstr2.sh b/tests/test-mbsstr2.sh
index 5ef71392c3..d1905d61b4 100755
--- a/tests/test-mbsstr2.sh
+++ b/tests/test-mbsstr2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbsstr3.sh b/tests/test-mbsstr3.sh
index 539f9c0342..5e781bfce1 100755
--- a/tests/test-mbsstr3.sh
+++ b/tests/test-mbsstr3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no chinese GB18030 locale is installed"
diff --git a/tests/test-mbstoc32s-1.sh b/tests/test-mbstoc32s-1.sh
index 24d80f2023..9fa0ae9833 100755
--- a/tests/test-mbstoc32s-1.sh
+++ b/tests/test-mbstoc32s-1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-mbstoc32s-2.sh b/tests/test-mbstoc32s-2.sh
index c21f2e85d9..80d54a9e8e 100755
--- a/tests/test-mbstoc32s-2.sh
+++ b/tests/test-mbstoc32s-2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-mbstoc32s-3.sh b/tests/test-mbstoc32s-3.sh
index d62af62e73..a69decd165 100755
--- a/tests/test-mbstoc32s-3.sh
+++ b/tests/test-mbstoc32s-3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-mbstoc32s-4.sh b/tests/test-mbstoc32s-4.sh
index b0d1343721..9fc9a69f01 100755
--- a/tests/test-mbstoc32s-4.sh
+++ b/tests/test-mbstoc32s-4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-nl_langinfo.sh b/tests/test-nl_langinfo.sh
index b1ce46ce09..a66672fe2c 100755
--- a/tests/test-nl_langinfo.sh
+++ b/tests/test-nl_langinfo.sh
@@ -3,13 +3,13 @@
 LC_ALL=C ${CHECKER} ./test-nl_langinfo${EXEEXT} 0 || exit 1
 
 # Test whether a specific traditional locale is installed.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR ${CHECKER} ./test-nl_langinfo${EXEEXT} 1 || exit 1
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 ${CHECKER} ./test-nl_langinfo${EXEEXT} 2 || exit 1
 fi
diff --git a/tests/test-parse-duration.sh b/tests/test-parse-duration.sh
index 9f0d0fe164..7f27f72a60 100755
--- a/tests/test-parse-duration.sh
+++ b/tests/test-parse-duration.sh
@@ -17,7 +17,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/tests/test-perror.sh b/tests/test-perror.sh
index e776609a0c..e6244413a0 100755
--- a/tests/test-perror.sh
+++ b/tests/test-perror.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 # Test NULL prefix. Result should not contain a number, except in lines that
diff --git a/tests/test-printf-posix.sh b/tests/test-printf-posix.sh
index d496406af4..3ac993a2e9 100755
--- a/tests/test-printf-posix.sh
+++ b/tests/test-printf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-printf-posix.tmp t-printf-posix.out"
 ${CHECKER} ./test-printf-posix${EXEEXT} > t-printf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-printf-posix.tmp > t-printf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-printf-posix.out
 result=$?
 
diff --git a/tests/test-set-mode-acl.sh b/tests/test-set-mode-acl.sh
index fdcd64bb38..fa9771e034 100755
--- a/tests/test-set-mode-acl.sh
+++ b/tests/test-set-mode-acl.sh
@@ -18,7 +18,7 @@ func_tmpdir ()
   # Use the environment variable TMPDIR, falling back to /tmp. This allows
   # users to specify a different temporary directory, for example, if their
   # /tmp is filled up or too small.
-  : ${TMPDIR=/tmp}
+  : "${TMPDIR=/tmp}"
   {
     # Use the mktemp program if available. If not available, hide the error
     # message.
diff --git a/tests/test-setlocale1.sh b/tests/test-setlocale1.sh
index 53ad09f923..3c187f5d83 100755
--- a/tests/test-setlocale1.sh
+++ b/tests/test-setlocale1.sh
@@ -1,9 +1,9 @@
 #!/bin/sh
 
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-: ${LOCALE_JA=ja_JP}
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_FR=fr_FR}"
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
+: "${LOCALE_JA=ja_JP}"
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 
 if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \
    && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then
diff --git a/tests/test-strtod1.sh b/tests/test-strtod1.sh
index 2ec4ebf260..1b2de5926a 100755
--- a/tests/test-strtod1.sh
+++ b/tests/test-strtod1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR=fr_FR}"
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 
 if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
diff --git a/tests/test-strtold1.sh b/tests/test-strtold1.sh
index 3f4c4b916a..1302c19931 100755
--- a/tests/test-strtold1.sh
+++ b/tests/test-strtold1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR=fr_FR}"
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 
 if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
diff --git a/tests/test-unicodeio2.sh b/tests/test-unicodeio2.sh
index f0ec8fb633..f0f197181b 100755
--- a/tests/test-unicodeio2.sh
+++ b/tests/test-unicodeio2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-unicodeio3.sh b/tests/test-unicodeio3.sh
index 1544c9614c..9a301cfe46 100755
--- a/tests/test-unicodeio3.sh
+++ b/tests/test-unicodeio3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-vasnprintf-posix2.sh b/tests/test-vasnprintf-posix2.sh
index 90932191fc..79c1e2f76f 100755
--- a/tests/test-vasnprintf-posix2.sh
+++ b/tests/test-vasnprintf-posix2.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 # Test whether a french locale is installed.
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR=fr_FR}"
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR != none; then
   testlocale=$LOCALE_FR
 else
diff --git a/tests/test-vc-list-files-cvs.sh b/tests/test-vc-list-files-cvs.sh
index 38c74a66f9..35a8da2c60 100755
--- a/tests/test-vc-list-files-cvs.sh
+++ b/tests/test-vc-list-files-cvs.sh
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 tmpdir=vc-cvs
diff --git a/tests/test-vc-list-files-git.sh b/tests/test-vc-list-files-git.sh
index 7c4da79e13..28292322a0 100755
--- a/tests/test-vc-list-files-git.sh
+++ b/tests/test-vc-list-files-git.sh
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 tmpdir=vc-git-$$
diff --git a/tests/test-vdprintf-posix.sh b/tests/test-vdprintf-posix.sh
index 8dd2336f7f..a2616b3793 100755
--- a/tests/test-vdprintf-posix.sh
+++ b/tests/test-vdprintf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-vdprintf-posix.tmp t-vdprintf-posix.out"
 ${CHECKER} ./test-vdprintf-posix${EXEEXT} > t-vdprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-vdprintf-posix.tmp > t-vdprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-vdprintf-posix.out
 result=$?
 
diff --git a/tests/test-vfprintf-posix.sh b/tests/test-vfprintf-posix.sh
index d8ced96bca..d5453e3f9c 100755
--- a/tests/test-vfprintf-posix.sh
+++ b/tests/test-vfprintf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-vfprintf-posix.tmp t-vfprintf-posix.out"
 ${CHECKER} ./test-vfprintf-posix${EXEEXT} > t-vfprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-vfprintf-posix.tmp > t-vfprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-vfprintf-posix.out
 result=$?
 
diff --git a/tests/test-vprintf-posix.sh b/tests/test-vprintf-posix.sh
index 911c980d73..7e85eb2948 100755
--- a/tests/test-vprintf-posix.sh
+++ b/tests/test-vprintf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-vprintf-posix.tmp t-vprintf-posix.out"
 ${CHECKER} ./test-vprintf-posix${EXEEXT} > t-vprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-vprintf-posix.tmp > t-vprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-vprintf-posix.out
 result=$?
 
diff --git a/tests/test-wcrtomb.sh b/tests/test-wcrtomb.sh
index 1a31b6eecc..01d8d53b36 100755
--- a/tests/test-wcrtomb.sh
+++ b/tests/test-wcrtomb.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 1 \
@@ -9,7 +9,7 @@ if test $LOCALE_FR != none; then
 fi
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 2 \
@@ -17,7 +17,7 @@ if test $LOCALE_FR_UTF8 != none; then
 fi
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 3 \
@@ -25,7 +25,7 @@ if test $LOCALE_JA != none; then
 fi
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
   ${CHECKER} ./test-wcrtomb${EXEEXT} 4 \
diff --git a/tests/test-wcsnrtombs1.sh b/tests/test-wcsnrtombs1.sh
index b744419426..0468a68221 100755
--- a/tests/test-wcsnrtombs1.sh
+++ b/tests/test-wcsnrtombs1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-wcsnrtombs2.sh b/tests/test-wcsnrtombs2.sh
index 0c6e45a346..2066794398 100755
--- a/tests/test-wcsnrtombs2.sh
+++ b/tests/test-wcsnrtombs2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-wcsnrtombs3.sh b/tests/test-wcsnrtombs3.sh
index e6cd47218e..1b67da7fb5 100755
--- a/tests/test-wcsnrtombs3.sh
+++ b/tests/test-wcsnrtombs3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-wcsnrtombs4.sh b/tests/test-wcsnrtombs4.sh
index d124a20331..c7759505ac 100755
--- a/tests/test-wcsnrtombs4.sh
+++ b/tests/test-wcsnrtombs4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-wcsrtombs1.sh b/tests/test-wcsrtombs1.sh
index f496892504..47ce3235bb 100755
--- a/tests/test-wcsrtombs1.sh
+++ b/tests/test-wcsrtombs1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/test-wcsrtombs2.sh b/tests/test-wcsrtombs2.sh
index 84d87e332a..e347c8903d 100755
--- a/tests/test-wcsrtombs2.sh
+++ b/tests/test-wcsrtombs2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/test-wcsrtombs3.sh b/tests/test-wcsrtombs3.sh
index b19ab50c86..217be4b4db 100755
--- a/tests/test-wcsrtombs3.sh
+++ b/tests/test-wcsrtombs3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific EUC-JP locale is installed.
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional japanese locale is installed"
diff --git a/tests/test-wcsrtombs4.sh b/tests/test-wcsrtombs4.sh
index d70ccd826c..d8e0edeef9 100755
--- a/tests/test-wcsrtombs4.sh
+++ b/tests/test-wcsrtombs4.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific GB18030 locale is installed.
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no transitional chinese locale is installed"
diff --git a/tests/test-xprintf-posix.sh b/tests/test-xprintf-posix.sh
index 2a671978ae..f46059fa11 100755
--- a/tests/test-xprintf-posix.sh
+++ b/tests/test-xprintf-posix.sh
@@ -7,7 +7,7 @@ tmpfiles="$tmpfiles t-xprintf-posix.tmp t-xprintf-posix.out"
 ${CHECKER} ./test-xprintf-posix${EXEEXT} > t-xprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-xprintf-posix.tmp > t-xprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-xprintf-posix.out
 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
@@ -15,7 +15,7 @@ tmpfiles="$tmpfiles t-xfprintf-posix.tmp t-xfprintf-posix.out"
 ${CHECKER} ./test-xfprintf-posix${EXEEXT} > t-xfprintf-posix.tmp || exit 1
 LC_ALL=C tr -d '\r' < t-xfprintf-posix.tmp > t-xfprintf-posix.out || exit 1
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} "${srcdir}/test-printf-posix.output" t-xfprintf-posix.out
 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
diff --git a/tests/test-xstrtoimax.sh b/tests/test-xstrtoimax.sh
index 6a48e67b0a..f41e52eaca 100755
--- a/tests/test-xstrtoimax.sh
+++ b/tests/test-xstrtoimax.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
diff --git a/tests/test-xstrtol.sh b/tests/test-xstrtol.sh
index 15dd91159b..e82b585bf4 100755
--- a/tests/test-xstrtol.sh
+++ b/tests/test-xstrtol.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
diff --git a/tests/test-xstrtoll.sh b/tests/test-xstrtoll.sh
index 8fcbce31df..d738acc381 100755
--- a/tests/test-xstrtoll.sh
+++ b/tests/test-xstrtoll.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
diff --git a/tests/test-xstrtoumax.sh b/tests/test-xstrtoumax.sh
index 3ec4cc6a43..5faca6a439 100755
--- a/tests/test-xstrtoumax.sh
+++ b/tests/test-xstrtoumax.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
diff --git a/tests/test-yesno.sh b/tests/test-yesno.sh
index 67caa77086..3f8f101ef3 100755
--- a/tests/test-yesno.sh
+++ b/tests/test-yesno.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-: ${srcdir=.}
+: "${srcdir=.}"
 . "$srcdir/init.sh"; path_prepend_ .
 
 # For now, only test with C locale
diff --git a/tests/unicase/test-locale-language.sh 
b/tests/unicase/test-locale-language.sh
index 4e5b90ab64..5229b4cf5b 100755
--- a/tests/unicase/test-locale-language.sh
+++ b/tests/unicase/test-locale-language.sh
@@ -2,27 +2,27 @@
 
 LC_ALL=C                       ${CHECKER} ./test-locale-language${EXEEXT} '' 
|| exit 1
 
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR            ${CHECKER} ./test-locale-language${EXEEXT} fr 
|| exit 1
 fi
 
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8       ${CHECKER} ./test-locale-language${EXEEXT} fr 
|| exit 1
 fi
 
-: ${LOCALE_JA=ja_JP}
+: "${LOCALE_JA=ja_JP}"
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA            ${CHECKER} ./test-locale-language${EXEEXT} ja 
|| exit 1
 fi
 
-: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+: "${LOCALE_TR_UTF8=tr_TR.UTF-8}"
 if test $LOCALE_TR_UTF8 != none; then
   LC_ALL=$LOCALE_TR_UTF8       ${CHECKER} ./test-locale-language${EXEEXT} tr 
|| exit 1
 fi
 
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
+: "${LOCALE_ZH_CN=zh_CN.GB18030}"
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN         ${CHECKER} ./test-locale-language${EXEEXT} zh 
|| exit 1
 fi
diff --git a/tests/unicase/test-ulc-casecmp1.sh 
b/tests/unicase/test-ulc-casecmp1.sh
index a5a61c6cf0..e9ed999b6d 100755
--- a/tests/unicase/test-ulc-casecmp1.sh
+++ b/tests/unicase/test-ulc-casecmp1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/unicase/test-ulc-casecmp2.sh 
b/tests/unicase/test-ulc-casecmp2.sh
index d449227971..6fdc6af3a9 100755
--- a/tests/unicase/test-ulc-casecmp2.sh
+++ b/tests/unicase/test-ulc-casecmp2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/unicase/test-ulc-casecoll1.sh 
b/tests/unicase/test-ulc-casecoll1.sh
index d18211bbb5..1606310393 100755
--- a/tests/unicase/test-ulc-casecoll1.sh
+++ b/tests/unicase/test-ulc-casecoll1.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/unicase/test-ulc-casecoll2.sh 
b/tests/unicase/test-ulc-casecoll2.sh
index a74c8b3052..3e149a34bc 100755
--- a/tests/unicase/test-ulc-casecoll2.sh
+++ b/tests/unicase/test-ulc-casecoll2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a specific UTF-8 locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no french Unicode locale is installed"
diff --git a/tests/unigbrk/test-ulc-grapheme-breaks.sh 
b/tests/unigbrk/test-ulc-grapheme-breaks.sh
index 0cad7608d9..119228ef30 100755
--- a/tests/unigbrk/test-ulc-grapheme-breaks.sh
+++ b/tests/unigbrk/test-ulc-grapheme-breaks.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8895-6 locale.
-: ${LOCALE_AR=ar_SA}
+: "${LOCALE_AR=ar_SA}"
 if test $LOCALE_AR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional Arabic locale is installed"
diff --git a/tests/unistdio/test-u16-vasnprintf2.sh 
b/tests/unistdio/test-u16-vasnprintf2.sh
index 714f1a4f77..a3b949accc 100755
--- a/tests/unistdio/test-u16-vasnprintf2.sh
+++ b/tests/unistdio/test-u16-vasnprintf2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a traditional french locale is installed.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   testlocale=$LOCALE_FR
 else
diff --git a/tests/unistdio/test-u16-vasnprintf3.sh 
b/tests/unistdio/test-u16-vasnprintf3.sh
index a5aa4a0010..5134b88449 100755
--- a/tests/unistdio/test-u16-vasnprintf3.sh
+++ b/tests/unistdio/test-u16-vasnprintf3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a french Unicode locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   testlocale=$LOCALE_FR_UTF8
 else
diff --git a/tests/unistdio/test-u32-vasnprintf2.sh 
b/tests/unistdio/test-u32-vasnprintf2.sh
index 94800e6d9c..9bf796fbe5 100755
--- a/tests/unistdio/test-u32-vasnprintf2.sh
+++ b/tests/unistdio/test-u32-vasnprintf2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a traditional french locale is installed.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   testlocale=$LOCALE_FR
 else
diff --git a/tests/unistdio/test-u32-vasnprintf3.sh 
b/tests/unistdio/test-u32-vasnprintf3.sh
index 9b487a57f5..aef4d74cf7 100755
--- a/tests/unistdio/test-u32-vasnprintf3.sh
+++ b/tests/unistdio/test-u32-vasnprintf3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a french Unicode locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   testlocale=$LOCALE_FR_UTF8
 else
diff --git a/tests/unistdio/test-u8-vasnprintf2.sh 
b/tests/unistdio/test-u8-vasnprintf2.sh
index 3ea389503d..2296d517f5 100755
--- a/tests/unistdio/test-u8-vasnprintf2.sh
+++ b/tests/unistdio/test-u8-vasnprintf2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a traditional french locale is installed.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   testlocale=$LOCALE_FR
 else
diff --git a/tests/unistdio/test-u8-vasnprintf3.sh 
b/tests/unistdio/test-u8-vasnprintf3.sh
index aa46e11fd0..383ae12b92 100755
--- a/tests/unistdio/test-u8-vasnprintf3.sh
+++ b/tests/unistdio/test-u8-vasnprintf3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a french Unicode locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   testlocale=$LOCALE_FR_UTF8
 else
diff --git a/tests/unistdio/test-ulc-vasnprintf2.sh 
b/tests/unistdio/test-ulc-vasnprintf2.sh
index dd4b31f4cf..73ddb80ef2 100755
--- a/tests/unistdio/test-ulc-vasnprintf2.sh
+++ b/tests/unistdio/test-ulc-vasnprintf2.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a traditional french locale is installed.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR != none; then
   testlocale=$LOCALE_FR
 else
diff --git a/tests/unistdio/test-ulc-vasnprintf3.sh 
b/tests/unistdio/test-ulc-vasnprintf3.sh
index 128c8a0ce7..1aacae9dd4 100755
--- a/tests/unistdio/test-ulc-vasnprintf3.sh
+++ b/tests/unistdio/test-ulc-vasnprintf3.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test whether a french Unicode locale is installed.
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
 if test $LOCALE_FR_UTF8 != none; then
   testlocale=$LOCALE_FR_UTF8
 else
diff --git a/tests/uniwbrk/test-ulc-wordbreaks.sh 
b/tests/uniwbrk/test-ulc-wordbreaks.sh
index d7e067e6b1..224a90f05b 100755
--- a/tests/uniwbrk/test-ulc-wordbreaks.sh
+++ b/tests/uniwbrk/test-ulc-wordbreaks.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
-: ${LOCALE_FR=fr_FR}
+: "${LOCALE_FR=fr_FR}"
 if test $LOCALE_FR = none; then
   if test -f /usr/bin/localedef; then
     echo "Skipping test: no traditional french locale is installed"
diff --git a/tests/uniwidth/test-uc_width2.sh b/tests/uniwidth/test-uc_width2.sh
index c4263447f6..675d675a99 100755
--- a/tests/uniwidth/test-uc_width2.sh
+++ b/tests/uniwidth/test-uc_width2.sh
@@ -912,7 +912,7 @@ E0100..E01EF        0
 E01F0..10FFFF  1
 EOF
 
-: ${DIFF=diff}
+: "${DIFF=diff}"
 ${DIFF} uc_width.ok uc_width.out
 result=$?
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]