diff options
author | Florent Le Coz <louiz@louiz.org> | 2013-11-16 12:07:16 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2013-11-16 12:08:32 +0100 |
commit | e7a441e798e0a32fc4bb4021e058f3dc080adc80 (patch) | |
tree | 994807dc470bec529c54bd7308f2e91891473999 /src | |
parent | a85e1abaaa5fe4f6cd9da7276088d14bf5f2c41f (diff) | |
download | biboumi-e7a441e798e0a32fc4bb4021e058f3dc080adc80.tar.gz biboumi-e7a441e798e0a32fc4bb4021e058f3dc080adc80.tar.bz2 biboumi-e7a441e798e0a32fc4bb4021e058f3dc080adc80.tar.xz biboumi-e7a441e798e0a32fc4bb4021e058f3dc080adc80.zip |
Add a test for xml escape/unescape
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 |