summaryrefslogtreecommitdiff
path: root/tests/multibyte-white-space
diff options
context:
space:
mode:
authorNorihiro Tanaka <noritnk@kcn.ne.jp>2014-11-08 07:49:27 -0800
committerJim Meyering <meyering@fb.com>2014-11-08 16:47:40 -0800
commit7c476caba56c5d25ac0426d2092b3d00af43913e (patch)
tree9c55345a4876fbd7e48bef49bc7ce8d493373df2 /tests/multibyte-white-space
parent8435da9d8106513acd5c87b74f8a928073f2cd5d (diff)
downloadgrep-7c476caba56c5d25ac0426d2092b3d00af43913e.tar.gz
tests: avoid awk+printf+\xHH portability trap
* tests/init.cfg (hex_printf_): Rewrite in terms of printf and sed. Using awk's printf with \xHH in the format string was not portable to the awk of Solaris 10, AIX 7 or HP-UX 11.23, as reported in http://debbugs.gnu.org/18987. * tests/word-multibyte: Use printf rather than hex_printf_, and give the character we're printing a name: e_acute (rather than A-grave), since that is used in other tests. a trailing \n in the format string, adjust by removing it, and instead invoking echo. * tests/multibyte-white-space: Simply remove each trailing \n. They were not needed.
Diffstat (limited to 'tests/multibyte-white-space')
-rwxr-xr-xtests/multibyte-white-space4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/multibyte-white-space b/tests/multibyte-white-space
index bb1bdaf6..abd4dc55 100755
--- a/tests/multibyte-white-space
+++ b/tests/multibyte-white-space
@@ -58,9 +58,9 @@ EOF
fail=0
for i in $utf8_space_characters; do
- hex_printf_ "$i\n" | grep -q '^\s$' \
+ hex_printf_ "$i" | grep -q '^\s$' \
|| { warn_ "$i FAILED to match \\s"; fail=1; }
- hex_printf_ "$i\n" | grep -q '\S'
+ hex_printf_ "$i" | grep -q '\S'
test $? = 1 \
|| { warn_ "$i vs. \\S FAILED"; fail=1; }
done