summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp7
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) == "&apos;coucou&apos;&lt;cc&gt;/&amp;&quot;gaga&quot;");
+ assert(xml_unescape(xml_escape(unescaped)) == unescaped);
+
+ /**
* JID parsing
*/
// Full JID