diff options
author | Jim Meyering <meyering@fb.com> | 2014-11-07 08:30:31 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-11-07 08:31:59 -0800 |
commit | 95dea21fcaa62d8d5efb2afe9d7c1afcd5ec496f (patch) | |
tree | 174c5210afa5fbdd21dd82dddaf6ba552316ab13 /tests/multibyte-white-space | |
parent | 74c1f309e35d456c48efed5d2193df4f66b67272 (diff) | |
download | grep-95dea21fcaa62d8d5efb2afe9d7c1afcd5ec496f.tar.gz |
maint: move helper function, hex_printf to init.cfg
* tests/init.cfg (hex_printf_): New function, from ...
* tests/multibyte-white-space: ... here. Reflect the
s/hex_print/hex_printf_/ renaming.
Diffstat (limited to 'tests/multibyte-white-space')
-rwxr-xr-x | tests/multibyte-white-space | 12 |
1 files changed, 2 insertions, 10 deletions
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 |