summaryrefslogtreecommitdiffstats
path: root/src/test/regress/expected/regex.linux.utf8.out
blob: 7c170a99f3d19534ae24dd25788c8b50784c2426 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
 * This test is for Linux/glibc systems and others that implement proper
 * locale classification of Unicode characters with high code values.
 * It must be run in a database with UTF8 encoding and a Unicode-aware locale.
 */
SET client_encoding TO UTF8;
--
-- Test the "high colormap" logic with single characters and ranges that
-- exceed the MAX_SIMPLE_CHR cutoff, here assumed to be less than U+2000.
--
-- trivial cases:
SELECT 'aⓐ' ~ U&'a\24D0' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓐ' ~ U&'a\24D1' AS f;
 f 
---
 f
(1 row)

SELECT 'aⓕ' ~ 'a[ⓐ-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⒻ' ~ 'a[ⓐ-ⓩ]' AS f;
 f 
---
 f
(1 row)

-- cases requiring splitting of ranges:
SELECT 'aⓕⓕ' ~ 'aⓕ[ⓐ-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓕⓐ' ~ 'aⓕ[ⓐ-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓐⓕ' ~ 'aⓕ[ⓐ-ⓩ]' AS f;
 f 
---
 f
(1 row)

SELECT 'aⓕⓕ' ~ 'a[ⓐ-ⓩ]ⓕ' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓕⓐ' ~ 'a[ⓐ-ⓩ]ⓕ' AS f;
 f 
---
 f
(1 row)

SELECT 'aⓐⓕ' ~ 'a[ⓐ-ⓩ]ⓕ' AS t;
 t 
---
 t
(1 row)

SELECT 'aⒶⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓜⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓜⓩ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓩⓩ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS f;
 f 
---
 f
(1 row)

SELECT 'aⓜ⓪' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS f;
 f 
---
 f
(1 row)

SELECT 'a0' ~ 'a[a-ⓩ]' AS f;
 f 
---
 f
(1 row)

SELECT 'aq' ~ 'a[a-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓜ' ~ 'a[a-ⓩ]' AS t;
 t 
---
 t
(1 row)

SELECT 'a⓪' ~ 'a[a-ⓩ]' AS f;
 f 
---
 f
(1 row)

-- Locale-dependent character classes
SELECT 'aⒶⓜ⓪' ~ '[[:alpha:]][[:alpha:]][[:alpha:]][[:graph:]]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⒶⓜ⓪' ~ '[[:alpha:]][[:alpha:]][[:alpha:]][[:alpha:]]' AS f;
 f 
---
 f
(1 row)

-- Locale-dependent character classes with high ranges
SELECT 'aⒶⓜ⓪' ~ '[a-z][[:alpha:]][ⓐ-ⓩ][[:graph:]]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⓜⒶ⓪' ~ '[a-z][[:alpha:]][ⓐ-ⓩ][[:graph:]]' AS f;
 f 
---
 f
(1 row)

SELECT 'aⓜⒶ⓪' ~ '[a-z][ⓐ-ⓩ][[:alpha:]][[:graph:]]' AS t;
 t 
---
 t
(1 row)

SELECT 'aⒶⓜ⓪' ~ '[a-z][ⓐ-ⓩ][[:alpha:]][[:graph:]]' AS f;
 f 
---
 f
(1 row)