From: Jason Stephenson Date: Fri, 19 Nov 2021 22:44:37 +0000 (-0500) Subject: LP1937294: Fix the unaccent and squash tests X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a75d7a34ee5fd4b3bb5f32c7a36b9a131913c016;p=Evergreen.git LP1937294: Fix the unaccent and squash tests Changes in Pg 12 and Pg 14 character handling necessitate changes to two of the tests in t/lp1501781-unaccent_and_squash.pg. These are similar to changes made for PostgreSQL 9.6. Signed-off-by: Jason Stephenson Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg b/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg index 2de74d699d..a5e7348809 100644 --- a/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg +++ b/Open-ILS/src/sql/Pg/t/lp1501781-unaccent_and_squash.pg @@ -30,7 +30,8 @@ SELECT is(evergreen.unaccent_and_squash('0123456789!@#$%^&*()-+'), '0123456789', 'Numbers and Symbols'); SELECT is(evergreen.unaccent_and_squash('ÁÉÍÑÓÚÜáéíñóúü¿¡'), - 'aeinouuaeinouu¿¡', 'Spanish'); + CASE WHEN substring(version() from '^PostgreSQL ([0-9]+)\.')::INTEGER < 14 THEN 'aeinouuaeinouu¿¡' + ELSE 'aeinouuaeinouu?!' END, 'Spanish'); SELECT is(evergreen.unaccent_and_squash('ÖÜÇĞŞöüçğşİI'), 'oucgsoucgsii', 'Turkish'); @@ -45,7 +46,8 @@ SELECT is(evergreen.unaccent_and_squash('ÁĄÄÉĘĚÍÓÔÚŮÝČĹŇŔŘŠŽ' 'aaaeeeioouuyclnrrsz', 'Czeck, Slovack & Slovenian'); SELECT is(evergreen.unaccent_and_squash('Άά Έέ Ήή Ίί Όό Ύύ Ώώ'), - 'άάέέήήίίόόύύώώ', 'Greek'); + CASE WHEN substring(version() from '^PostgreSQL ([0-9]+)\.')::INTEGER < 12 THEN 'άάέέήήίίόόύύώώ' + ELSE 'ααεεηηιιοουυωω' END, 'Greek'); SELECT is(evergreen.unaccent_and_squash('Jacques Bélanger'), 'jacquesbelanger', 'French nom and prénom');