summaryrefslogtreecommitdiff
path: root/tests/pcre-utf8
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pcre-utf8')
-rwxr-xr-xtests/pcre-utf86
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8
index b8228d51..a3b9390b 100755
--- a/tests/pcre-utf8
+++ b/tests/pcre-utf8
@@ -19,9 +19,15 @@ echo '$' | LC_ALL=en_US.UTF-8 grep -qP '\p{S}' \
euro='\342\202\254 euro'
printf "$euro\\n" > in || framework_failure_
+# The euro sign has the unicode "Symbol" property, so this must match:
LC_ALL=en_US.UTF-8 grep -P '^\p{S}' in > out || fail=1
compare in out || fail=1
+# This RE must *not* match in the C locale, because the first
+# byte is not a "Symbol".
+LC_ALL=C grep -P '^\p{S}' in > out && fail=1
+compare /dev/null out || fail=1
+
LC_ALL=en_US.UTF-8 grep -P '^. euro$' in > out2 || fail=1
compare in out2 || fail=1