diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-22 04:38:07 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-22 04:38:07 +0000 |
| commit | 28ef1abc10cfbc2c3d2747c008eb2300858d0426 (patch) | |
| tree | 41208fb8f393e6cb6cc8f939623ad47a0db17876 /tests/word-delim-multibyte | |
| download | grep-tarball-master.tar.gz | |
Diffstat (limited to 'tests/word-delim-multibyte')
| -rwxr-xr-x | tests/word-delim-multibyte | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/word-delim-multibyte b/tests/word-delim-multibyte new file mode 100755 index 0000000..f65298f --- /dev/null +++ b/tests/word-delim-multibyte @@ -0,0 +1,27 @@ +#!/bin/sh +# exercise \< and \> with multibyte data. +# Derived from http://savannah.gnu.org/bugs/?29537 +. "${srcdir=.}/init.sh"; path_prepend_ ../src + +require_en_utf8_locale_ + +e_acute=$(printf '\303\251') +echo "$e_acute" > in || framework_failure_ +LC_ALL=en_US.UTF-8 +export LC_ALL + +fail=0 + +grep "\\<$e_acute" in > out 2>err || fail=1 +compare out in || fail=1 +compare /dev/null err || fail=1 + +grep "$e_acute\\>" in > out 2>err || fail=1 +compare out in || fail=1 +compare /dev/null err || fail=1 + +grep -w "$e_acute" in > out 2>err || fail=1 +compare out in || fail=1 +compare /dev/null err || fail=1 + +Exit $fail |
