]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/t/xml_escape.pg
LP#1470957: adjust a previous regression test
[Evergreen.git] / Open-ILS / src / sql / Pg / t / xml_escape.pg
1
2 BEGIN;
3
4 -- Plan the tests.
5 SELECT plan(5);
6
7 SELECT is(
8     evergreen.xml_escape('A Song of Ice & Fire'),
9     'A Song of Ice & Fire',
10     'XML-Escape ampersand'
11 );
12
13 SELECT is(
14     evergreen.xml_escape('A Song of Rice and <<< Fire'),
15     'A Song of Rice and &lt;&lt;&lt; Fire',
16     'XML-Escape less-than'
17 );
18
19 SELECT is(
20     evergreen.xml_escape('>A Song of Mice and >>> Fire'),
21     '&gt;A Song of Mice and &gt;&gt;&gt; Fire',
22     'XML-Escape greater-than'
23 );
24
25 SELECT is(
26     evergreen.xml_escape('<A> Song of Vice &&& <<Fire'),
27     '&lt;A&gt; Song of Vice &amp;&amp;&amp; &lt;&lt;Fire',
28     'XML-Escape mixed'
29 );
30
31 SELECT is(
32     evergreen.xml_escape('åbçdéñœöîøæÇıÂÅÍÎÏÔÔÒÚÆŒè'), 
33     'åbçdéñœöîøæÇıÂÅÍÎÏÔÔÒÚÆŒè',
34     'XML-Escape no changes'
35 );
36
37 -- Finish the tests and clean up.
38 SELECT * FROM finish();
39 ROLLBACK;