diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/icu/t/010_database.pl | 4 | ||||
-rw-r--r-- | src/test/regress/expected/unicode.out | 18 | ||||
-rw-r--r-- | src/test/regress/sql/unicode.sql | 4 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/test/icu/t/010_database.pl b/src/test/icu/t/010_database.pl index 0e9446cebef..67fc3bbf19b 100644 --- a/src/test/icu/t/010_database.pl +++ b/src/test/icu/t/010_database.pl @@ -27,6 +27,10 @@ CREATE TABLE icu (def text, en text COLLATE "en-x-icu", upfirst text COLLATE upp INSERT INTO icu VALUES ('a', 'a', 'a'), ('b', 'b', 'b'), ('A', 'A', 'A'), ('B', 'B', 'B'); }); +is( $node1->safe_psql('dbicu', q{SELECT icu_unicode_version() IS NOT NULL}), + qq(t), + 'ICU unicode version defined'); + is( $node1->safe_psql('dbicu', q{SELECT def FROM icu ORDER BY def}), qq(A a diff --git a/src/test/regress/expected/unicode.out b/src/test/regress/expected/unicode.out index f2713a23268..1e06de22649 100644 --- a/src/test/regress/expected/unicode.out +++ b/src/test/regress/expected/unicode.out @@ -8,6 +8,24 @@ SELECT U&'\0061\0308bc' <> U&'\00E4bc' COLLATE "C" AS sanity_check; t (1 row) +SELECT unicode_version() IS NOT NULL; + ?column? +---------- + t +(1 row) + +SELECT unicode_assigned(U&'abc'); + unicode_assigned +------------------ + t +(1 row) + +SELECT unicode_assigned(U&'abc\+10FFFF'); + unicode_assigned +------------------ + f +(1 row) + SELECT normalize(''); normalize ----------- diff --git a/src/test/regress/sql/unicode.sql b/src/test/regress/sql/unicode.sql index 63cd523f85f..e50adb68ed0 100644 --- a/src/test/regress/sql/unicode.sql +++ b/src/test/regress/sql/unicode.sql @@ -5,6 +5,10 @@ SELECT getdatabaseencoding() <> 'UTF8' AS skip_test \gset SELECT U&'\0061\0308bc' <> U&'\00E4bc' COLLATE "C" AS sanity_check; +SELECT unicode_version() IS NOT NULL; +SELECT unicode_assigned(U&'abc'); +SELECT unicode_assigned(U&'abc\+10FFFF'); + SELECT normalize(''); SELECT normalize(U&'\0061\0308\24D1c') = U&'\00E4\24D1c' COLLATE "C" AS test_default; SELECT normalize(U&'\0061\0308\24D1c', NFC) = U&'\00E4\24D1c' COLLATE "C" AS test_nfc; |