summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/init.cfg8
-rwxr-xr-xtests/multibyte-white-space12
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/init.cfg b/tests/init.cfg
index 882feb1c..9342d3d6 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -154,3 +154,11 @@ or use the shortcut target of the toplevel Makefile,
'
fi
}
+
+# Like printf with a single argument.
+# The difference is that while some printf implementations fail to
+# handle \xHH escapes, no awk implementation has that problem.
+hex_printf_()
+{
+ ${AWK-awk} 'BEGIN { printf "'"$1"'" }' </dev/null
+}
diff --git a/tests/multibyte-white-space b/tests/multibyte-white-space
index 58166431..bb1bdaf6 100755
--- a/tests/multibyte-white-space
+++ b/tests/multibyte-white-space
@@ -57,18 +57,10 @@ EOF
fail=0
-# Like printf with a single argument.
-# The difference is that while some printf implementations fail to
-# handle \xHH escapes, no awk implementation has that problem.
-hex_printf()
-{
- ${AWK-awk} 'BEGIN { printf "'"$1"'" }' </dev/null
-}
-
for i in $utf8_space_characters; do
- hex_printf "$i\n" | grep -q '^\s$' \
+ hex_printf_ "$i\n" | grep -q '^\s$' \
|| { warn_ "$i FAILED to match \\s"; fail=1; }
- hex_printf "$i\n" | grep -q '\S'
+ hex_printf_ "$i\n" | grep -q '\S'
test $? = 1 \
|| { warn_ "$i vs. \\S FAILED"; fail=1; }
done