From: Bill Erickson Date: Fri, 14 Aug 2015 16:02:54 +0000 (-0400) Subject: LP#483502 PGTAP test for evergreen.xml_escape(TEXT) X-Git-Tag: sprint4-merge-nov22~1259 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7fec477f235fe5665b75d08244e9dccd1b535c25;p=working%2FEvergreen.git LP#483502 PGTAP test for evergreen.xml_escape(TEXT) Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/t/xml_escape.pg b/Open-ILS/src/sql/Pg/t/xml_escape.pg new file mode 100644 index 0000000000..5d2c28d5d7 --- /dev/null +++ b/Open-ILS/src/sql/Pg/t/xml_escape.pg @@ -0,0 +1,39 @@ + +BEGIN; + +-- Plan the tests. +SELECT plan(5); + +SELECT is( + evergreen.xml_escape('A Song of Ice & Fire'), + 'A Song of Ice & Fire', + 'XML-Escape ampersand' +); + +SELECT is( + evergreen.xml_escape('A Song of Rice and <<< Fire'), + 'A Song of Rice and <<< Fire', + 'XML-Escape less-than' +); + +SELECT is( + evergreen.xml_escape('>A Song of Mice and >>> Fire'), + '>A Song of Mice and >>> Fire', + 'XML-Escape greater-than' +); + +SELECT is( + evergreen.xml_escape(' Song of Vice &&& <