summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/wocky-caps-hash-test.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/wocky-caps-hash-test.c b/tests/wocky-caps-hash-test.c
index 8aa463c..b9724fb 100644
--- a/tests/wocky-caps-hash-test.c
+++ b/tests/wocky-caps-hash-test.c
@@ -99,6 +99,75 @@ test_complex (void)
}
static void
+test_qutim (void)
+{
+ /* QutIM example found in the wild. */
+ WockyStanza *stanza = wocky_stanza_build (WOCKY_STANZA_TYPE_IQ,
+ WOCKY_STANZA_SUB_TYPE_NONE, NULL, "badger",
+ '(', "identity",
+ '@', "type", "type",
+ '@', "name", "qutIM",
+ '@', "category", "client",
+ '@', "lang", "en",
+ ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/chatstates", ')',
+ '(', "feature", '@', "var", "vcard-temp", ')',
+ '(', "feature", '@', "var", "storage:bookmarks", ')',
+ '(', "feature", '@', "var", "urn:xmpp:receipts", ')',
+ '(', "feature", '@', "var", "urn:xmpp:ping", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/tune", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/pubsub", ')',
+ '(', "feature", '@', "var", "jabber:iq:version", ')',
+ '(', "feature", '@', "var", "urn:xmpp:time", ')',
+ '(', "feature", '@', "var", "jabber:iq:privacy", ')',
+ '(', "feature", '@', "var", "jabber:iq:roster", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/pubsub#event", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/muc#owner", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/muc#admin", ')',
+ '(', "feature", '@', "var", "jabber:iq:private", ')',
+ '(', "feature", '@', "var", "jabber:x:data", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/muc", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/disco#info", ')',
+ '(', "feature", '@', "var", "urn:ietf:params:xml:ns:xmpp-stanzas", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/disco#items", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/mood", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/muc#user", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/tune+notify", ')',
+ '(', "feature", '@', "var", "urn:xmpp:delay", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/caps", ')',
+ '(', "feature", '@', "var", "http://jabber.org/protocol/mood+notify", ')',
+ '(', "feature", '@', "var", "vcard-temp:x:update", ')',
+ '(', "x",
+ ':', "jabber:x:data",
+ '(', "field",
+ '@', "var", "FORM_TYPE",
+ '@', "type", "hidden",
+ '(', "value", '$', "urn:xmpp:dataforms:softwareinfo", ')',
+ ')',
+ '(', "field",
+ '@', "var", "ip_version",
+ '(', "value", '$', "ipv4", ')',
+ '(', "value", '$', "ipv6", ')',
+ ')',
+ '(', "field",
+ '@', "var", "os",
+ '(', "value", '$', "openSUSE 11.4 (x86_64)", ')',
+ ')',
+ '(', "field",
+ '@', "var", "software",
+ '(', "value", '$', "qutIM", ')',
+ ')',
+ '(', "field",
+ '@', "var", "software_version",
+ '(', "value", '$', "0.2.80.0", ')',
+ ')',
+ ')',
+ NULL);
+
+ check_hash (stanza, "xwN1fN0fsfW6bKUDpWPKYYGfKrE=");
+}
+
+static void
test_sorting_simple (void)
{
WockyStanza *stanza;
@@ -626,6 +695,7 @@ main (int argc, char **argv)
test_init (argc, argv);
g_test_add_func ("/caps-hash/simple", test_simple);
g_test_add_func ("/caps-hash/complex", test_complex);
+ g_test_add_func ("/caps-hash/qutim", test_qutim);
g_test_add_func ("/caps-hash/sorting/simple", test_sorting_simple);
g_test_add_func ("/caps-hash/sorting/complex", test_sorting_complex);
g_test_add_func ("/caps-hash/dataforms/invalid", test_dataforms_invalid);