diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test.cpp b/src/test.cpp index 7818451..9cb48b7 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -67,6 +67,13 @@ int main() xml.feed(doc.data(), doc.size(), true); /** + * XML escape/escape + */ + const std::string unescaped = "'coucou'<cc>/&\"gaga\""; + assert(xml_escape(unescaped) == "'coucou'<cc>/&"gaga""); + assert(xml_unescape(xml_escape(unescaped)) == unescaped); + + /** * JID parsing */ // Full JID |