diff options
author | Jeff Davis | 2024-04-04 23:10:12 +0000 |
---|---|---|
committer | Jeff Davis | 2024-04-04 23:10:12 +0000 |
commit | e2a235767180941eef8887240ddace1a021f04e3 (patch) | |
tree | 4f2a000fe46beccb04de006be95e9cc63075c312 | |
parent | e57fe3824ee7a9cb551ca1cae5aa0394216ef7b8 (diff) |
Fix test failures when language environment is not UTF-8.
For tests that depend on UTF-8 encoding, force LC_COLLATE=C and
LC_CTYPE=C to avoid an encoding mismatch.
Reported-by: Thomas Munro
Discussion: https://postgr.es/m/CA+hUKGK-ZqV1njkG_=xcCqXh2fcMkz85FTMnhS2opm4ZerH=xw@mail.gmail.com
-rw-r--r-- | src/bin/initdb/t/001_initdb.pl | 2 | ||||
-rw-r--r-- | src/bin/scripts/t/020_createdb.pl | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/initdb/t/001_initdb.pl b/src/bin/initdb/t/001_initdb.pl index c63d3206d99..b31dad2464f 100644 --- a/src/bin/initdb/t/001_initdb.pl +++ b/src/bin/initdb/t/001_initdb.pl @@ -200,6 +200,7 @@ command_ok( [ 'initdb', '--no-sync', '--locale-provider=builtin', '-E UTF-8', + '--lc-collate=C', '--lc-ctype=C', '--builtin-locale=C.UTF-8', "$tempdir/data8" ], 'locale provider builtin with -E UTF-8 --builtin-locale=C.UTF-8'); @@ -208,6 +209,7 @@ command_fails( [ 'initdb', '--no-sync', '--locale-provider=builtin', '-E SQL_ASCII', + '--lc-collate=C', '--lc-ctype=C', '--builtin-locale=C.UTF-8', "$tempdir/data9" ], 'locale provider builtin with --builtin-locale=C.UTF-8 fails for SQL_ASCII' diff --git a/src/bin/scripts/t/020_createdb.pl b/src/bin/scripts/t/020_createdb.pl index 0b371ea4dfc..512b55c48a9 100644 --- a/src/bin/scripts/t/020_createdb.pl +++ b/src/bin/scripts/t/020_createdb.pl @@ -143,6 +143,7 @@ $node->command_ok( [ 'createdb', '-T', 'template0', '--locale-provider=builtin', + '--lc-collate=C', '--lc-ctype=C', '-E UTF-8', '--builtin-locale=C.UTF8', 'tbuiltin5' ], @@ -152,6 +153,7 @@ $node->command_fails( [ 'createdb', '-T', 'template0', '--locale-provider=builtin', + '--lc-collate=C', '--lc-ctype=C', '-E LATIN1', '--builtin-locale=C.UTF-8', 'tbuiltin6' ], |