mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
On second thought, remove regex.linux.utf8 regression test altogether.
The code-coverage report says that this test doesn't increase coverage by one single line, which I now realize is because I made src/test/modules/test_regex/sql/test_regex_utf8.sql to cover all the code that this would. So really it's pointless and we should just drop it.
This commit is contained in:
parent
72a3ebf235
commit
987db509ed
@ -1,171 +0,0 @@
|
||||
/*
|
||||
* This test is for Linux/glibc systems (conceivably it could be run on
|
||||
* others that implement proper classification of high Unicode characters).
|
||||
* It must be run in a database with UTF8 encoding and a Unicode-aware locale.
|
||||
*/
|
||||
SELECT getdatabaseencoding() <> 'UTF8' OR
|
||||
current_setting('lc_ctype') = 'C' OR
|
||||
version() !~ 'linux-gnu'
|
||||
AS skip_test \gset
|
||||
\if :skip_test
|
||||
\quit
|
||||
\endif
|
||||
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)
|
||||
|
@ -1,11 +0,0 @@
|
||||
/*
|
||||
* This test is for Linux/glibc systems (conceivably it could be run on
|
||||
* others that implement proper classification of high Unicode characters).
|
||||
* It must be run in a database with UTF8 encoding and a Unicode-aware locale.
|
||||
*/
|
||||
SELECT getdatabaseencoding() <> 'UTF8' OR
|
||||
current_setting('lc_ctype') = 'C' OR
|
||||
version() !~ 'linux-gnu'
|
||||
AS skip_test \gset
|
||||
\if :skip_test
|
||||
\quit
|
@ -94,7 +94,7 @@ test: create_table_like alter_generic alter_operator misc async dbsize misc_func
|
||||
# rules cannot run concurrently with any test that creates
|
||||
# a view or rule in the public schema
|
||||
# collate.*.utf8 tests cannot be run in parallel with each other
|
||||
test: rules psql psql_crosstab amutils stats_ext collate.linux.utf8 regex.linux.utf8
|
||||
test: rules psql psql_crosstab amutils stats_ext collate.linux.utf8
|
||||
|
||||
# run by itself so it can run parallel workers
|
||||
test: select_parallel
|
||||
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* This test is for Linux/glibc systems (conceivably it could be run on
|
||||
* others that implement proper classification of high Unicode characters).
|
||||
* It must be run in a database with UTF8 encoding and a Unicode-aware locale.
|
||||
*/
|
||||
|
||||
SELECT getdatabaseencoding() <> 'UTF8' OR
|
||||
current_setting('lc_ctype') = 'C' OR
|
||||
version() !~ 'linux-gnu'
|
||||
AS skip_test \gset
|
||||
\if :skip_test
|
||||
\quit
|
||||
\endif
|
||||
|
||||
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;
|
||||
SELECT 'aⓐ' ~ U&'a\24D1' AS f;
|
||||
SELECT 'aⓕ' ~ 'a[ⓐ-ⓩ]' AS t;
|
||||
SELECT 'aⒻ' ~ 'a[ⓐ-ⓩ]' AS f;
|
||||
-- cases requiring splitting of ranges:
|
||||
SELECT 'aⓕⓕ' ~ 'aⓕ[ⓐ-ⓩ]' AS t;
|
||||
SELECT 'aⓕⓐ' ~ 'aⓕ[ⓐ-ⓩ]' AS t;
|
||||
SELECT 'aⓐⓕ' ~ 'aⓕ[ⓐ-ⓩ]' AS f;
|
||||
SELECT 'aⓕⓕ' ~ 'a[ⓐ-ⓩ]ⓕ' AS t;
|
||||
SELECT 'aⓕⓐ' ~ 'a[ⓐ-ⓩ]ⓕ' AS f;
|
||||
SELECT 'aⓐⓕ' ~ 'a[ⓐ-ⓩ]ⓕ' AS t;
|
||||
SELECT 'aⒶⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
|
||||
SELECT 'aⓜⓜ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
|
||||
SELECT 'aⓜⓩ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS t;
|
||||
SELECT 'aⓩⓩ' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS f;
|
||||
SELECT 'aⓜ⓪' ~ 'a[Ⓐ-ⓜ][ⓜ-ⓩ]' AS f;
|
||||
SELECT 'a0' ~ 'a[a-ⓩ]' AS f;
|
||||
SELECT 'aq' ~ 'a[a-ⓩ]' AS t;
|
||||
SELECT 'aⓜ' ~ 'a[a-ⓩ]' AS t;
|
||||
SELECT 'a⓪' ~ 'a[a-ⓩ]' AS f;
|
||||
|
||||
-- Locale-dependent character classes
|
||||
|
||||
SELECT 'aⒶⓜ⓪' ~ '[[:alpha:]][[:alpha:]][[:alpha:]][[:graph:]]' AS t;
|
||||
SELECT 'aⒶⓜ⓪' ~ '[[:alpha:]][[:alpha:]][[:alpha:]][[:alpha:]]' AS f;
|
||||
|
||||
-- Locale-dependent character classes with high ranges
|
||||
|
||||
SELECT 'aⒶⓜ⓪' ~ '[a-z][[:alpha:]][ⓐ-ⓩ][[:graph:]]' AS t;
|
||||
SELECT 'aⓜⒶ⓪' ~ '[a-z][[:alpha:]][ⓐ-ⓩ][[:graph:]]' AS f;
|
||||
SELECT 'aⓜⒶ⓪' ~ '[a-z][ⓐ-ⓩ][[:alpha:]][[:graph:]]' AS t;
|
||||
SELECT 'aⒶⓜ⓪' ~ '[a-z][ⓐ-ⓩ][[:alpha:]][[:graph:]]' AS f;
|
Loading…
Reference in New Issue
Block a user