From 52fa86a503649f1971dda2faf638a8b183bd6f6f Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Fri, 14 Aug 2015 13:19:49 -0500 Subject: [PATCH] LP#1483500 - pgtap Test for evergreen.lowercase Signed-off-by: Josh Stompro Signed-off-by: Yamil Suarez Signed-off-by: Kathy Lussier --- Open-ILS/src/sql/Pg/t/lowercase.pg | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/t/lowercase.pg diff --git a/Open-ILS/src/sql/Pg/t/lowercase.pg b/Open-ILS/src/sql/Pg/t/lowercase.pg new file mode 100644 index 0000000000..f72ac8bbd3 --- /dev/null +++ b/Open-ILS/src/sql/Pg/t/lowercase.pg @@ -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 -- 2.11.0