2 * This test is for Linux/glibc systems and others that implement proper
3 * locale classification of Unicode characters with high code values.
4 * It must be run in a database with UTF8 encoding and a Unicode-aware locale.
6 SET client_encoding TO UTF8;
8 -- Test the "high colormap" logic with single characters and ranges that
9 -- exceed the MAX_SIMPLE_CHR cutoff, here assumed to be less than U+2000.
12 SELECT 'aⓐ' ~ U&'a\24D0' AS t;
18 SELECT 'aⓐ' ~ U&'a\24D1' AS f;
24 SELECT 'aⓕ' ~ 'a[ⓐ-ⓩ]' AS t;
30 SELECT 'aⒻ' ~ 'a[ⓐ-ⓩ]' AS f;
36 -- cases requiring splitting of ranges:
37 SELECT 'aⓕⓕ' ~ 'aⓕ[ⓐ-ⓩ]' AS t;
43 SELECT 'aⓕⓐ' ~ 'aⓕ[ⓐ-ⓩ]' AS t;
49 SELECT 'aⓐⓕ' ~ 'aⓕ[ⓐ-ⓩ]' AS f;
55 SELECT 'aⓕⓕ' ~ 'a[ⓐ-ⓩ]ⓕ' AS t;
61 SELECT 'aⓕⓐ' ~ 'a[ⓐ-ⓩ]ⓕ' AS f;
67 SELECT 'aⓐⓕ' ~ 'a[ⓐ-ⓩ]ⓕ' AS t;
73 SELECT 'aⒶⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
79 SELECT 'aⓜⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
85 SELECT 'aⓜⓩ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
91 SELECT 'aⓩⓩ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS f;
97 SELECT 'aⓜ⓪' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS f;
103 SELECT 'a0' ~ 'a[a-ⓩ]' AS f;
109 SELECT 'aq' ~ 'a[a-ⓩ]' AS t;
115 SELECT 'aⓜ' ~ 'a[a-ⓩ]' AS t;
121 SELECT 'a⓪' ~ 'a[a-ⓩ]' AS f;
127 -- Locale-dependent character classes
128 SELECT 'aⒶⓜ⓪' ~ '[[:alpha:]][[:alpha:]][[:alpha:]][[:graph:]]' AS t;
134 SELECT 'aⒶⓜ⓪' ~ '[[:alpha:]][[:alpha:]][[:alpha:]][[:alpha:]]' AS f;
140 -- Locale-dependent character classes with high ranges
141 SELECT 'aⒶⓜ⓪' ~ '[a-z][[:alpha:]][ⓐ-ⓩ][[:graph:]]' AS t;
147 SELECT 'aⓜⒶ⓪' ~ '[a-z][[:alpha:]][ⓐ-ⓩ][[:graph:]]' AS f;
153 SELECT 'aⓜⒶ⓪' ~ '[a-z][ⓐ-ⓩ][[:alpha:]][[:graph:]]' AS t;
159 SELECT 'aⒶⓜ⓪' ~ '[a-z][ⓐ-ⓩ][[:alpha:]][[:graph:]]' AS f;