LP#1483500 - pgtap Test for evergreen.lowercase
authorJosh Stompro <stomproj@larl.org>
Fri, 14 Aug 2015 18:19:49 +0000 (13:19 -0500)
committerKathy Lussier <klussier@masslnc.org>
Thu, 12 Nov 2015 02:09:12 +0000 (21:09 -0500)
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Yamil Suarez <yamil@yamil.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/sql/Pg/t/lowercase.pg [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/t/lowercase.pg b/Open-ILS/src/sql/Pg/t/lowercase.pg
new file mode 100644 (file)
index 0000000..f72ac8b
--- /dev/null
@@ -0,0 +1,21 @@
+-- Start transaction and plan the tests.
+BEGIN;
+
+-- Number of tests that will be run
+SELECT plan(7);
+
+-- Run the tests
+
+SELECT is( evergreen.lowercase('aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ'), 'aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'English Characters');
+SELECT is( evergreen.lowercase('0123456789!@#$%^&*()-+'), '0123456789!@#$%^&*()-+', 'Numbers and Symbols');
+SELECT is( evergreen.lowercase('ÁÉÍÑÓÚÜáéíñóúü¿¡'), 'áéíñóúüáéíñóúü¿¡', 'Spanish');
+SELECT is( evergreen.lowercase('ÖÜÇĞŞöüçğş'), 'öüçğşöüçğş', 'Turkish');
+-- Skipping Turkish i's - İ-> i, I -> ı since the lowercase doesn't seem to handle them correctly.
+SELECT is( evergreen.lowercase('ÄÉÖÜ'), 'äéöü', 'German');
+SELECT is( evergreen.lowercase('АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'), 'абвгдежзийклмнопрстуфхцчшщъыьэюя', 'Russian');
+SELECT is( evergreen.lowercase('ÁĄÄÉĘĚÍÓÔÚŮÝČĹŇŔŘŠŽ'), 'áąäéęěíóôúůýčĺňŕřšž', 'Czeck, Slovack & Slovenian');
+
+
+-- Finish the test and clean up.
+SELECT * FROM finish();
+ROLLBACK;
\ No newline at end of file