aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-01-05 17:31:54 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-01-05 17:31:54 -0500
commit72a3ebf235b52fdb715214027026f66a0ad7da4d (patch)
treee6d80196e000708c10b3e7a5d147f799f66e583b /src
parentf4566345cf40b068368cb5617e61318da60676ec (diff)
downloadpostgresql-72a3ebf235b52fdb715214027026f66a0ad7da4d.tar.gz
postgresql-72a3ebf235b52fdb715214027026f66a0ad7da4d.zip
Enable routine running of regex.linux.utf8 regression test.
Up to now this has just sat there as a test you could invoke via EXTRA_TESTS, which of course nobody does. I'm feeling encouraged because c2e8bd275 hasn't yet broke anything, so let's try making this run with a suitable guard condition (similar to collate.linux.utf8).
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/regex.linux.utf8.out11
-rw-r--r--src/test/regress/expected/regex.linux.utf8_1.out11
-rw-r--r--src/test/regress/parallel_schedule2
-rw-r--r--src/test/regress/sql/regex.linux.utf8.sql12
4 files changed, 31 insertions, 5 deletions
diff --git a/src/test/regress/expected/regex.linux.utf8.out b/src/test/regress/expected/regex.linux.utf8.out
index 7c170a99f3d..3550cffb88d 100644
--- a/src/test/regress/expected/regex.linux.utf8.out
+++ b/src/test/regress/expected/regex.linux.utf8.out
@@ -1,8 +1,15 @@
/*
- * This test is for Linux/glibc systems and others that implement proper
- * locale classification of Unicode characters with high code values.
+ * 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
diff --git a/src/test/regress/expected/regex.linux.utf8_1.out b/src/test/regress/expected/regex.linux.utf8_1.out
new file mode 100644
index 00000000000..9c6ff495418
--- /dev/null
+++ b/src/test/regress/expected/regex.linux.utf8_1.out
@@ -0,0 +1,11 @@
+/*
+ * 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
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 5b0c73d7e37..d442eb7411a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -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
+test: rules psql psql_crosstab amutils stats_ext collate.linux.utf8 regex.linux.utf8
# run by itself so it can run parallel workers
test: select_parallel
diff --git a/src/test/regress/sql/regex.linux.utf8.sql b/src/test/regress/sql/regex.linux.utf8.sql
index 45778116452..2dd269e3727 100644
--- a/src/test/regress/sql/regex.linux.utf8.sql
+++ b/src/test/regress/sql/regex.linux.utf8.sql
@@ -1,9 +1,17 @@
/*
- * This test is for Linux/glibc systems and others that implement proper
- * locale classification of Unicode characters with high code values.
+ * 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;
--