summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Laban <david.laban@collabora.co.uk>2011-07-22 02:18:41 -0400
committerDavid Laban <david.laban@collabora.co.uk>2011-07-22 02:18:41 -0400
commit99759b6b93105a2ed593c0f8c96135a57c9bbf95 (patch)
treeecc5f3a9771d1ead45a2c2d30737f8dbcfdc120b
parent9064ddfd7afd83c892f65be8365dec242dcce880 (diff)
test-caps-hash: qutim's form has no type.qutim-caps-39464
-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);