diff options
author | James Booth <boothj5@gmail.com> | 2015-12-30 00:12:24 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-12-30 00:12:24 +0000 |
commit | 7f98e013e1ba103f3c9b4606be369f49673a2711 (patch) | |
tree | 4a904a7baf6d8209a57881c849ec5cbfe17d0708 | |
parent | 6a8656a06b209e7e181ad8670fe50b7e6fe89572 (diff) | |
download | profani-tty-7f98e013e1ba103f3c9b4606be369f49673a2711.tar.gz |
Use single quotes in functional test stanzas
-rw-r--r-- | tests/functionaltests/proftest.c | 12 | ||||
-rw-r--r-- | tests/functionaltests/test_carbons.c | 34 | ||||
-rw-r--r-- | tests/functionaltests/test_chat_session.c | 44 | ||||
-rw-r--r-- | tests/functionaltests/test_connect.c | 20 | ||||
-rw-r--r-- | tests/functionaltests/test_message.c | 8 | ||||
-rw-r--r-- | tests/functionaltests/test_muc.c | 110 | ||||
-rw-r--r-- | tests/functionaltests/test_ping.c | 18 | ||||
-rw-r--r-- | tests/functionaltests/test_presence.c | 56 | ||||
-rw-r--r-- | tests/functionaltests/test_receipts.c | 12 | ||||
-rw-r--r-- | tests/functionaltests/test_rooms.c | 12 | ||||
-rw-r--r-- | tests/functionaltests/test_roster.c | 48 | ||||
-rw-r--r-- | tests/functionaltests/test_software.c | 56 |
12 files changed, 215 insertions, 215 deletions
diff --git a/tests/functionaltests/proftest.c b/tests/functionaltests/proftest.c index 2888aaad..3b256f60 100644 --- a/tests/functionaltests/proftest.c +++ b/tests/functionaltests/proftest.c @@ -227,8 +227,8 @@ void prof_connect_with_roster(char *roster) { GString *roster_str = g_string_new( - "<iq type=\"result\" to=\"stabber@localhost/profanity\">" - "<query xmlns=\"jabber:iq:roster\" ver=\"362\">" + "<iq type='result' to='stabber@localhost/profanity'>" + "<query xmlns='jabber:iq:roster' ver='362'>" ); g_string_append(roster_str, roster); g_string_append(roster_str, @@ -240,9 +240,9 @@ prof_connect_with_roster(char *roster) g_string_free(roster_str, TRUE); stbbr_for_id("prof_presence_1", - "<presence id=\"prof_presence_1\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"stabber@localhost/profanity\">" + "<presence id='prof_presence_1' lang='en' to='stabber@localhost/profanity' from='stabber@localhost/profanity'>" "<priority>0</priority>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"f8mrtdyAmhnj8Ca+630bThSL718=\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='f8mrtdyAmhnj8Ca+630bThSL718='/>" "</presence>" ); @@ -260,7 +260,7 @@ void prof_connect(void) { prof_connect_with_roster( - "<item jid=\"buddy1@localhost\" subscription=\"both\" name=\"Buddy1\"/>" - "<item jid=\"buddy2@localhost\" subscription=\"both\" name=\"Buddy2\"/>" + "<item jid='buddy1@localhost' subscription='both' name='Buddy1'/>" + "<item jid='buddy2@localhost' subscription='both' name='Buddy2'/>" ); } diff --git a/tests/functionaltests/test_carbons.c b/tests/functionaltests/test_carbons.c index 96639d60..94bd57a0 100644 --- a/tests/functionaltests/test_carbons.c +++ b/tests/functionaltests/test_carbons.c @@ -19,7 +19,7 @@ send_enable_carbons(void **state) prof_input("/carbons on"); assert_true(stbbr_received( - "<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>" + "<iq id='*' type='set'><enable xmlns='urn:xmpp:carbons:2'/></iq>" )); } @@ -31,7 +31,7 @@ connect_with_carbons_enabled(void **state) prof_connect(); assert_true(stbbr_received( - "<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>" + "<iq id='*' type='set'><enable xmlns='urn:xmpp:carbons:2'/></iq>" )); } @@ -45,7 +45,7 @@ send_disable_carbons(void **state) prof_input("/carbons off"); assert_true(stbbr_received( - "<iq id=\"*\" type=\"set\"><disable xmlns=\"urn:xmpp:carbons:2\"/></iq>" + "<iq id='*' type='set'><disable xmlns='urn:xmpp:carbons:2'/></iq>" )); } @@ -56,24 +56,24 @@ receive_carbon(void **state) prof_connect(); assert_true(stbbr_received( - "<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>" + "<iq id='*' type='set'><enable xmlns='urn:xmpp:carbons:2'/></iq>" )); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>On my mobile</status>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online, \"On my mobile\"")); prof_input("/msg Buddy1"); - prof_output_exact("unencrypted"); + assert_true(prof_output_exact("unencrypted")); stbbr_send( - "<message type=\"chat\" to=\"stabber@localhost/profanity\" from=\"buddy1@localhost\">" - "<received xmlns=\"urn:xmpp:carbons:2\">" - "<forwarded xmlns=\"urn:xmpp:forward:0\">" - "<message id=\"prof_msg_7\" xmlns=\"jabber:client\" type=\"chat\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"buddy1@localhost/mobile\">" + "<message type='chat' to='stabber@localhost/profanity' from='buddy1@localhost'>" + "<received xmlns='urn:xmpp:carbons:2'>" + "<forwarded xmlns='urn:xmpp:forward:0'>" + "<message id='prof_msg_7' xmlns='jabber:client' type='chat' lang='en' to='stabber@localhost/profanity' from='buddy1@localhost/mobile'>" "<body>test carbon from recipient</body>" "</message>" "</forwarded>" @@ -91,24 +91,24 @@ receive_self_carbon(void **state) prof_connect(); assert_true(stbbr_received( - "<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>" + "<iq id='*' type='set'><enable xmlns='urn:xmpp:carbons:2'/></iq>" )); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>On my mobile</status>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online, \"On my mobile\"")); prof_input("/msg Buddy1"); - prof_output_exact("unencrypted"); + assert_true(prof_output_exact("unencrypted")); stbbr_send( - "<message type=\"chat\" to=\"stabber@localhost/profanity\" from=\"stabber@localhost\">" - "<sent xmlns=\"urn:xmpp:carbons:2\">" - "<forwarded xmlns=\"urn:xmpp:forward:0\">" - "<message id=\"59\" xmlns=\"jabber:client\" type=\"chat\" to=\"buddy1@localhost/mobile\" lang=\"en\" from=\"stabber@localhost/profanity\">" + "<message type='chat' to='stabber@localhost/profanity' from='stabber@localhost'>" + "<sent xmlns='urn:xmpp:carbons:2'>" + "<forwarded xmlns='urn:xmpp:forward:0'>" + "<message id='59' xmlns='jabber:client' type='chat' to='buddy1@localhost/mobile' lang='en' from='stabber@localhost/profanity'>" "<body>self sent carbon</body>" "</message>" "</forwarded>" diff --git a/tests/functionaltests/test_chat_session.c b/tests/functionaltests/test_chat_session.c index 9e779afa..6589ae36 100644 --- a/tests/functionaltests/test_chat_session.c +++ b/tests/functionaltests/test_chat_session.c @@ -19,7 +19,7 @@ sends_message_to_barejid_when_contact_offline(void **state) prof_input("/msg buddy1@localhost Hi there"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost\" type=\"chat\">" + "<message id='*' to='buddy1@localhost' type='chat'>" "<body>Hi there</body>" "</message>" )); @@ -31,7 +31,7 @@ sends_message_to_barejid_when_contact_online(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost/profanity\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost/profanity' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "</presence>" ); @@ -40,7 +40,7 @@ sends_message_to_barejid_when_contact_online(void **state) prof_input("/msg buddy1@localhost Hi there"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost\" type=\"chat\">" + "<message id='*' to='buddy1@localhost' type='chat'>" "<body>Hi there</body>" "</message>" )); @@ -52,14 +52,14 @@ sends_message_to_fulljid_when_received_from_fulljid(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='buddy1@localhost/mobile' type='chat'>" "<body>First message</body>" "</message>" ); @@ -68,7 +68,7 @@ sends_message_to_fulljid_when_received_from_fulljid(void **state) prof_input("/msg buddy1@localhost Hi there"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/mobile' type='chat'>" "<body>Hi there</body>" "</message>" )); @@ -80,14 +80,14 @@ sends_subsequent_messages_to_fulljid(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='buddy1@localhost/mobile' type='chat'>" "<body>First message</body>" "</message>" ); @@ -95,21 +95,21 @@ sends_subsequent_messages_to_fulljid(void **state) prof_input("/msg buddy1@localhost Outgoing 1"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/mobile' type='chat'>" "<body>Outgoing 1</body>" "</message>" )); prof_input("/msg buddy1@localhost Outgoing 2"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/mobile' type='chat'>" "<body>Outgoing 2</body>" "</message>" )); prof_input("/msg buddy1@localhost Outgoing 3"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/mobile' type='chat'>" "<body>Outgoing 3</body>" "</message>" )); @@ -121,14 +121,14 @@ resets_to_barejid_after_presence_received(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='buddy1@localhost/mobile' type='chat'>" "<body>First message</body>" "</message>" ); @@ -136,13 +136,13 @@ resets_to_barejid_after_presence_received(void **state) prof_input("/msg buddy1@localhost Outgoing 1"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/mobile' type='chat'>" "<body>Outgoing 1</body>" "</message>" )); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/laptop\">" + "<presence to='stabber@localhost' from='buddy1@localhost/laptop'>" "<priority>5</priority>" "<show>dnd</show>" "</presence>" @@ -151,7 +151,7 @@ resets_to_barejid_after_presence_received(void **state) prof_input("/msg buddy1@localhost Outgoing 2"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost\" type=\"chat\">" + "<message id='*' to='buddy1@localhost' type='chat'>" "<body>Outgoing 2</body>" "</message>" )); @@ -163,14 +163,14 @@ new_session_when_message_received_from_different_fulljid(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/laptop\">" + "<presence to='stabber@localhost' from='buddy1@localhost/laptop'>" "<priority>8</priority>" "<show>away</show>" "</presence>" @@ -178,7 +178,7 @@ new_session_when_message_received_from_different_fulljid(void **state) assert_true(prof_output_exact("Buddy1 (laptop) is away")); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='buddy1@localhost/mobile' type='chat'>" "<body>From first resource</body>" "</message>" ); @@ -186,13 +186,13 @@ new_session_when_message_received_from_different_fulljid(void **state) prof_input("/msg buddy1@localhost Outgoing 1"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/mobile' type='chat'>" "<body>Outgoing 1</body>" "</message>" )); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"buddy1@localhost/laptop\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='buddy1@localhost/laptop' type='chat'>" "<body>From second resource</body>" "</message>" ); @@ -200,7 +200,7 @@ new_session_when_message_received_from_different_fulljid(void **state) prof_input("/msg buddy1@localhost Outgoing 2"); assert_true(stbbr_received( - "<message id=\"*\" to=\"buddy1@localhost/laptop\" type=\"chat\">" + "<message id='*' to='buddy1@localhost/laptop' type='chat'>" "<body>Outgoing 2</body>" "</message>" )); diff --git a/tests/functionaltests/test_connect.c b/tests/functionaltests/test_connect.c index b14d7e85..08d60412 100644 --- a/tests/functionaltests/test_connect.c +++ b/tests/functionaltests/test_connect.c @@ -17,7 +17,7 @@ connect_jid_requests_roster(void **state) prof_connect(); assert_true(stbbr_received( - "<iq id=\"*\" type=\"get\"><query xmlns=\"jabber:iq:roster\"/></iq>" + "<iq id='*' type='get'><query xmlns='jabber:iq:roster'/></iq>" )); } @@ -27,8 +27,8 @@ connect_jid_sends_presence_after_receiving_roster(void **state) prof_connect(); assert_true(stbbr_received( - "<presence id=\"*\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<presence id='*'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); } @@ -39,9 +39,9 @@ connect_jid_requests_bookmarks(void **state) prof_connect(); assert_true(stbbr_received( - "<iq id=\"*\" type=\"get\">" - "<query xmlns=\"jabber:iq:private\">" - "<storage xmlns=\"storage:bookmarks\"/>" + "<iq id='*' type='get'>" + "<query xmlns='jabber:iq:private'>" + "<storage xmlns='storage:bookmarks'/>" "</query>" "</iq>" )); @@ -62,7 +62,7 @@ connect_shows_presence_updates(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<show>dnd</show>" "<status>busy!</status>" "</presence>" @@ -70,7 +70,7 @@ connect_shows_presence_updates(void **state) assert_true(prof_output_exact("Buddy1 (mobile) is dnd, \"busy!\"")); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/laptop\">" + "<presence to='stabber@localhost' from='buddy1@localhost/laptop'>" "<show>chat</show>" "<status>Talk to me!</status>" "</presence>" @@ -78,7 +78,7 @@ connect_shows_presence_updates(void **state) assert_true(prof_output_exact("Buddy1 (laptop) is chat, \"Talk to me!\"")); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy2@localhost/work\">" + "<presence to='stabber@localhost' from='buddy2@localhost/work'>" "<show>away</show>" "<status>Out of office</status>" "</presence>" @@ -86,7 +86,7 @@ connect_shows_presence_updates(void **state) assert_true(prof_output_exact("Buddy2 (work) is away, \"Out of office\"")); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<show>xa</show>" "<status>Gone :(</status>" "</presence>" diff --git a/tests/functionaltests/test_message.c b/tests/functionaltests/test_message.c index e7c56fbc..e622d7ff 100644 --- a/tests/functionaltests/test_message.c +++ b/tests/functionaltests/test_message.c @@ -19,7 +19,7 @@ message_send(void **state) prof_input("/msg somejid@someserver.com Hi there"); assert_true(stbbr_received( - "<message id=\"*\" to=\"somejid@someserver.com\" type=\"chat\">" + "<message id='*' to='somejid@someserver.com' type='chat'>" "<body>Hi there</body>" "</message>" )); @@ -33,7 +33,7 @@ message_receive_console(void **state) prof_connect(); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"someuser@chatserv.org/laptop\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='someuser@chatserv.org/laptop' type='chat'>" "<body>How are you?</body>" "</message>" ); @@ -47,10 +47,10 @@ message_receive_chatwin(void **state) prof_connect(); prof_input("/msg someuser@chatserv.org"); - prof_output_exact("someuser@chatserv.org"); + assert_true(prof_output_exact("someuser@chatserv.org")); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"someuser@chatserv.org/laptop\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='someuser@chatserv.org/laptop' type='chat'>" "<body>How are you?</body>" "</message>" ); diff --git a/tests/functionaltests/test_muc.c b/tests/functionaltests/test_muc.c index c0c4aaee..57c06a33 100644 --- a/tests/functionaltests/test_muc.c +++ b/tests/functionaltests/test_muc.c @@ -19,9 +19,9 @@ sends_room_join(void **state) prof_input("/join testroom@conference.localhost"); assert_true(stbbr_last_received( - "<presence id=\"*\" to=\"testroom@conference.localhost/stabber\">" - "<x xmlns=\"http://jabber.org/protocol/muc\"/>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<presence id='*' to='testroom@conference.localhost/stabber'>" + "<x xmlns='http://jabber.org/protocol/muc'/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); } @@ -34,9 +34,9 @@ sends_room_join_with_default_muc_service(void **state) prof_input("/join testroom"); assert_true(stbbr_last_received( - "<presence id=\"*\" to=\"testroom@conference.localhost/stabber\">" - "<x xmlns=\"http://jabber.org/protocol/muc\"/>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<presence id='*' to='testroom@conference.localhost/stabber'>" + "<x xmlns='http://jabber.org/protocol/muc'/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); } @@ -49,9 +49,9 @@ sends_room_join_with_nick(void **state) prof_input("/join testroom@conference.localhost nick testnick"); assert_true(stbbr_last_received( - "<presence id=\"*\" to=\"testroom@conference.localhost/testnick\">" - "<x xmlns=\"http://jabber.org/protocol/muc\"/>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<presence id='*' to='testroom@conference.localhost/testnick'>" + "<x xmlns='http://jabber.org/protocol/muc'/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); } @@ -64,11 +64,11 @@ sends_room_join_with_password(void **state) prof_input("/join testroom@conference.localhost password testpassword"); assert_true(stbbr_last_received( - "<presence id=\"*\" to=\"testroom@conference.localhost/stabber\">" - "<x xmlns=\"http://jabber.org/protocol/muc\">" + "<presence id='*' to='testroom@conference.localhost/stabber'>" + "<x xmlns='http://jabber.org/protocol/muc'>" "<password>testpassword</password>" "</x>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); } @@ -81,11 +81,11 @@ sends_room_join_with_nick_and_password(void **state) prof_input("/join testroom@conference.localhost nick testnick password testpassword"); assert_true(stbbr_last_received( - "<presence id=\"*\" to=\"testroom@conference.localhost/testnick\">" - "<x xmlns=\"http://jabber.org/protocol/muc\">" + "<presence id='*' to='testroom@conference.localhost/testnick'>" + "<x xmlns='http://jabber.org/protocol/muc'>" "<password>testpassword</password>" "</x>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); } @@ -96,12 +96,12 @@ shows_role_and_affiliation_on_join(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>" + "<presence id='prof_join_2' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>" "</x>" - "<status code=\"110\"/>" + "<status code='110'/>" "</presence>" ); @@ -116,12 +116,12 @@ shows_subject_on_join(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>" + "<presence id='prof_join_2' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>" "</x>" - "<status code=\"110\"/>" + "<status code='110'/>" "</presence>" ); @@ -129,7 +129,7 @@ shows_subject_on_join(void **state) assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); stbbr_send( - "<message type=\"groupchat\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost\">" + "<message type='groupchat' to='stabber@localhost/profanity' from='testroom@conference.localhost'>" "<subject>Test room subject</subject>" "<body>anothernick has set the subject to: Test room subject</body>" "</message>" @@ -144,12 +144,12 @@ shows_history_message(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>" + "<presence id='prof_join_2' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>" "</x>" - "<status code=\"110\"/>" + "<status code='110'/>" "</presence>" ); @@ -157,10 +157,10 @@ shows_history_message(void **state) assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); stbbr_send( - "<message type=\"groupchat\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/testoccupant\">" + "<message type='groupchat' to='stabber@localhost/profanity' from='testroom@conference.localhost/testoccupant'>" "<body>an old message</body>" - "<delay xmlns=\"urn:xmpp:delay\" stamp=\"2015-12-19T23:55:25Z\" from=\"testroom@conference.localhost\"/>" - "<x xmlns=\"jabber:x:delay\" stamp=\"20151219T23:55:25\"/>" + "<delay xmlns='urn:xmpp:delay' stamp='2015-12-19T23:55:25Z' from='testroom@conference.localhost'/>" + "<x xmlns='jabber:x:delay' stamp='20151219T23:55:25'/>" "</message>" ); @@ -173,12 +173,12 @@ shows_occupant_join(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>" + "<presence id='prof_join_2' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>" "</x>" - "<status code=\"110\"/>" + "<status code='110'/>" "</presence>" ); @@ -186,9 +186,9 @@ shows_occupant_join(void **state) assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); stbbr_send( - "<presence to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/testoccupant\">" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"someuser@someserver.org/work\" affiliation=\"none\"/>" + "<presence to='stabber@localhost/profanity' from='testroom@conference.localhost/testoccupant'>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='someuser@someserver.org/work' affiliation='none'/>" "</x>" "</presence>" ); @@ -202,12 +202,12 @@ shows_message(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>" + "<presence id='prof_join_2' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>" "</x>" - "<status code=\"110\"/>" + "<status code='110'/>" "</presence>" ); @@ -215,7 +215,7 @@ shows_message(void **state) assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); stbbr_send( - "<message type=\"groupchat\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/testoccupant\">" + "<message type='groupchat' to='stabber@localhost/profanity' from='testroom@conference.localhost/testoccupant'>" "<body>a new message</body>" "</message>" ); @@ -229,12 +229,12 @@ shows_message_in_console_when_window_not_focussed(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>" - "<x xmlns=\"http://jabber.org/protocol/muc#user\">" - "<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>" + "<presence id='prof_join_2' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://www.profanity.im' ver='*'/>" + "<x xmlns='http://jabber.org/protocol/muc#user'>" + "<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>" "</x>" - "<status code=\"110\"/>" + "<status code='110'/>" "</presence>" ); @@ -242,10 +242,10 @@ shows_message_in_console_when_window_not_focussed(void **state) assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); prof_input("/win 1"); - prof_output_exact("Profanity. Type /help for help informatiosn."); + assert_true(prof_output_exact("Profanity. Type /help for help information.")); stbbr_send( - "<message type=\"groupchat\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/testoccupant\">" + "<message type='groupchat' to='stabber@localhost/profanity' from='testroom@conference.localhost/testoccupant'>" "<body>a new message</body>" "</message>" ); diff --git a/tests/functionaltests/test_ping.c b/tests/functionaltests/test_ping.c index 76fd979c..a3f3458c 100644 --- a/tests/functionaltests/test_ping.c +++ b/tests/functionaltests/test_ping.c @@ -15,26 +15,26 @@ void ping_multiple(void **state) { stbbr_for_id("prof_ping_2", - "<iq id=\"prof_ping_2\" type=\"result\" to=\"stabber@localhost/profanity\"/>" + "<iq id='prof_ping_2' type='result' to='stabber@localhost/profanity'/>" ); stbbr_for_id("prof_ping_3", - "<iq id=\"prof_ping_3\" type=\"result\" to=\"stabber@localhost/profanity\"/>" + "<iq id='prof_ping_3' type='result' to='stabber@localhost/profanity'/>" ); prof_connect(); prof_input("/ping"); assert_true(stbbr_received( - "<iq id=\"prof_ping_2\" type=\"get\">" - "<ping xmlns=\"urn:xmpp:ping\"/>" + "<iq id='prof_ping_2' type='get'>" + "<ping xmlns='urn:xmpp:ping'/>" "</iq>" )); assert_true(prof_output_exact("Ping response from server")); prof_input("/ping"); assert_true(stbbr_received( - "<iq id=\"prof_ping_3\" type=\"get\">" - "<ping xmlns=\"urn:xmpp:ping\"/>" + "<iq id='prof_ping_3' type='get'>" + "<ping xmlns='urn:xmpp:ping'/>" "</iq>" )); assert_true(prof_output_exact("Ping response from server")); @@ -46,12 +46,12 @@ ping_responds(void **state) prof_connect(); stbbr_send( - "<iq id=\"pingtest1\" type=\"get\" to=\"stabber@localhost/profanity\" from=\"localhost\">" - "<ping xmlns=\"urn:xmpp:ping\"/>" + "<iq id='pingtest1' type='get' to='stabber@localhost/profanity' from='localhost'>" + "<ping xmlns='urn:xmpp:ping'/>" "</iq>" ); assert_true(stbbr_received( - "<iq id=\"pingtest1\" type=\"result\" from=\"stabber@localhost/profanity\" to=\"localhost\"/>" + "<iq id='pingtest1' type='result' from='stabber@localhost/profanity' to='localhost'/>" )); } diff --git a/tests/functionaltests/test_presence.c b/tests/functionaltests/test_presence.c index 7f37f2fd..5b51113c 100644 --- a/tests/functionaltests/test_presence.c +++ b/tests/functionaltests/test_presence.c @@ -19,8 +19,8 @@ presence_online(void **state) prof_input("/online"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<presence id='prof_presence_2'>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -35,9 +35,9 @@ presence_online_with_message(void **state) prof_input("/online \"Hi there\""); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<status>Hi there</status>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -52,9 +52,9 @@ presence_away(void **state) prof_input("/away"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>away</show>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -69,10 +69,10 @@ presence_away_with_message(void **state) prof_input("/away \"I'm not here for a bit\""); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>away</show>" "<status>I'm not here for a bit</status>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -87,9 +87,9 @@ presence_xa(void **state) prof_input("/xa"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>xa</show>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -104,10 +104,10 @@ presence_xa_with_message(void **state) prof_input("/xa \"Gone to the shops\""); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>xa</show>" "<status>Gone to the shops</status>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -122,9 +122,9 @@ presence_dnd(void **state) prof_input("/dnd"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>dnd</show>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -139,10 +139,10 @@ presence_dnd_with_message(void **state) prof_input("/dnd \"Working\""); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>dnd</show>" "<status>Working</status>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -157,9 +157,9 @@ presence_chat(void **state) prof_input("/chat"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>chat</show>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -174,10 +174,10 @@ presence_chat_with_message(void **state) prof_input("/chat \"Free to talk\""); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<show>chat</show>" "<status>Free to talk</status>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -192,9 +192,9 @@ presence_set_priority(void **state) prof_input("/priority 25"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<priority>25</priority>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); @@ -208,20 +208,20 @@ presence_includes_priority(void **state) prof_input("/priority 25"); assert_true(stbbr_received( - "<presence id=\"prof_presence_2\">" + "<presence id='prof_presence_2'>" "<priority>25</priority>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); assert_true(prof_output_exact("Priority set to 25.")); prof_input("/chat \"Free to talk\""); assert_true(stbbr_received( - "<presence id=\"prof_presence_3\">" + "<presence id='prof_presence_3'>" "<priority>25</priority>" "<show>chat</show>" "<status>Free to talk</status>" - "<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" ver=\"*\" node=\"http://www.profanity.im\"/>" + "<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://www.profanity.im'/>" "</presence>" )); assert_true(prof_output_exact("Status set to chat (priority 25), \"Free to talk\".")); @@ -233,7 +233,7 @@ presence_received(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" @@ -249,7 +249,7 @@ presence_missing_resource_defaults(void **state) prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost\">" + "<presence to='stabber@localhost' from='buddy1@localhost'>" "<priority>15</priority>" "<status>My status</status>" "</presence>" diff --git a/tests/functionaltests/test_receipts.c b/tests/functionaltests/test_receipts.c index 357663f3..6a347f7e 100644 --- a/tests/functionaltests/test_receipts.c +++ b/tests/functionaltests/test_receipts.c @@ -21,9 +21,9 @@ send_receipt_request(void **state) prof_input("/msg somejid@someserver.com Hi there"); assert_true(stbbr_received( - "<message id=\"*\" type=\"chat\" to=\"somejid@someserver.com\">" + "<message id='*' type='chat' to='somejid@someserver.com'>" "<body>Hi there</body>" - "<request xmlns=\"urn:xmpp:receipts\"/>" + "<request xmlns='urn:xmpp:receipts'/>" "</message>" )); } @@ -36,15 +36,15 @@ send_receipt_on_request(void **state) prof_connect(); stbbr_send( - "<message id=\"msg12213\" type=\"chat\" to=\"stabber@localhost/profanity\" from=\"someuser@server.org/profanity\">" + "<message id='msg12213' type='chat' to='stabber@localhost/profanity' from='someuser@server.org/profanity'>" "<body>Wants a receipt</body>" - "<request xmlns=\"urn:xmpp:receipts\"/>" + "<request xmlns='urn:xmpp:receipts'/>" "</message>" ); assert_true(stbbr_received( - "<message id=\"*\" to=\"someuser@server.org/profanity\">" - "<received id=\"msg12213\" xmlns=\"urn:xmpp:receipts\"/>" + "<message id='*' to='someuser@server.org/profanity'>" + "<received id='msg12213' xmlns='urn:xmpp:receipts'/>" "</message>" )); } diff --git a/tests/functionaltests/test_rooms.c b/tests/functionaltests/test_rooms.c index c81ded6b..9bff2e19 100644 --- a/tests/functionaltests/test_rooms.c +++ b/tests/functionaltests/test_rooms.c @@ -15,10 +15,10 @@ void rooms_query(void **state) { stbbr_for_id("confreq", - "<iq id=\"confreq\" type=\"result\" to=\"stabber@localhost/profanity\" from=\"conference.localhost\">" - "<query xmlns=\"http://jabber.org/protocol/disco#items\">" - "<item jid=\"chatroom@conference.localhost\" name=\"A chat room\"/>" - "<item jid=\"hangout@conference.localhost\" name=\"Another chat room\"/>" + "<iq id='confreq' type='result' to='stabber@localhost/profanity' from='conference.localhost'>" + "<query xmlns='http://jabber.org/protocol/disco#items'>" + "<item jid='chatroom@conference.localhost' name='A chat room'/>" + "<item jid='hangout@conference.localhost' name='Another chat room'/>" "</query>" "</iq>" ); @@ -31,8 +31,8 @@ rooms_query(void **state) assert_true(prof_output_exact("hangout@conference.localhost, (Another chat room)")); assert_true(stbbr_last_received( - "<iq id=\"confreq\" to=\"conference.localhost\" type=\"get\">" - "<query xmlns=\"http://jabber.org/protocol/disco#items\"/>" + "<iq id='confreq' to='conference.localhost' type='get'>" + "<query xmlns='http://jabber.org/protocol/disco#items'/>" "</iq>" )); } diff --git a/tests/functionaltests/test_roster.c b/tests/functionaltests/test_roster.c index 7a3f5656..aa06016e 100644 --- a/tests/functionaltests/test_roster.c +++ b/tests/functionaltests/test_roster.c @@ -17,9 +17,9 @@ sends_new_item(void **state) prof_connect(); stbbr_for_query("jabber:iq:roster", - "<iq type=\"set\" from=\"stabber@localhost\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"bob@localhost\" subscription=\"none\" name=\"\"/>" + "<iq type='set' from='stabber@localhost'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='bob@localhost' subscription='none' name=''/>" "</query>" "</iq>" ); @@ -27,9 +27,9 @@ sends_new_item(void **state) prof_input("/roster add bob@localhost"); assert_true(stbbr_received( - "<iq type=\"set\" id=\"*\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"bob@localhost\" name=\"\"/>" + "<iq type='set' id='*'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='bob@localhost' name=''/>" "</query>" "</iq>" )); @@ -43,9 +43,9 @@ sends_new_item_nick(void **state) prof_connect(); stbbr_for_query("jabber:iq:roster", - "<iq type=\"set\" from=\"stabber@localhost\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"bob@localhost\" subscription=\"none\" name=\"Bobby\"/>" + "<iq type='set' from='stabber@localhost'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='bob@localhost' subscription='none' name='Bobby'/>" "</query>" "</iq>" ); @@ -53,9 +53,9 @@ sends_new_item_nick(void **state) prof_input("/roster add bob@localhost Bobby"); assert_true(stbbr_received( - "<iq type=\"set\" id=\"*\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"bob@localhost\" name=\"Bobby\"/>" + "<iq type='set' id='*'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='bob@localhost' name='Bobby'/>" "</query>" "</iq>" )); @@ -67,14 +67,14 @@ void sends_remove_item(void **state) { prof_connect_with_roster( - "<item jid=\"buddy1@localhost\" subscription=\"both\"/>" - "<item jid=\"buddy2@localhost\" subscription=\"both\"/>" + "<item jid='buddy1@localhost' subscription='both'/>" + "<item jid='buddy2@localhost' subscription='both'/>" ); stbbr_for_query("jabber:iq:roster", - "<iq id=\"*\" type=\"set\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"buddy1@localhost\" subscription=\"remove\"/>" + "<iq id='*' type='set'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='buddy1@localhost' subscription='remove'/>" "</query>" "</iq>" ); @@ -82,9 +82,9 @@ sends_remove_item(void **state) prof_input("/roster remove buddy1@localhost"); assert_true(stbbr_received( - "<iq type=\"set\" id=\"*\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"buddy1@localhost\" subscription=\"remove\"/>" + "<iq type='set' id='*'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='buddy1@localhost' subscription='remove'/>" "</query>" "</iq>" )); @@ -96,7 +96,7 @@ void sends_nick_change(void **state) { prof_connect_with_roster( - "<item jid=\"buddy1@localhost\" subscription=\"both\"/>" + "<item jid='buddy1@localhost' subscription='both'/>" ); prof_input("/roster nick buddy1@localhost Buddy1"); @@ -104,9 +104,9 @@ sends_nick_change(void **state) assert_true(prof_output_exact("Nickname for buddy1@localhost set to: Buddy1.")); assert_true(stbbr_received( - "<iq type=\"set\" id=\"*\">" - "<query xmlns=\"jabber:iq:roster\">" - "<item jid=\"buddy1@localhost\" name=\"Buddy1\"/>" + "<iq type='set' id='*'>" + "<query xmlns='jabber:iq:roster'>" + "<item jid='buddy1@localhost' name='Buddy1'/>" "</query>" "</iq>" )); diff --git a/tests/functionaltests/test_software.c b/tests/functionaltests/test_software.c index 2f3ab9cf..00bccf61 100644 --- a/tests/functionaltests/test_software.c +++ b/tests/functionaltests/test_software.c @@ -16,19 +16,19 @@ send_software_version_request(void **state) { prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); - prof_output_exact("Buddy1 (mobile) is online, \"I'm here\""); + assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); prof_input("/software buddy1@localhost/mobile"); - stbbr_received( - "<iq id=\"*\" to=\"buddy1@localhost/mobile\" type=\"get\">" - "<query xmlns=\"jabber:iq:version\"/>" + assert_true(stbbr_received( + "<iq id='*' to='buddy1@localhost/mobile' type='get'>" + "<query xmlns='jabber:iq:version'/>" "</iq>" - ); + )); } void @@ -36,16 +36,16 @@ display_software_version_result(void **state) { prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); - prof_output_exact("Buddy1 (mobile) is online, \"I'm here\""); + assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); stbbr_for_query("jabber:iq:version", - "<iq id=\"*\" type=\"result\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"buddy1@localhost/mobile\">" - "<query xmlns=\"jabber:iq:version\">" + "<iq id='*' type='result' lang='en' to='stabber@localhost/profanity' from='buddy1@localhost/mobile'>" + "<query xmlns='jabber:iq:version'>" "<name>Profanity</name>" "<version>0.4.7dev.master.2cb2f83</version>" "</query>" @@ -63,18 +63,18 @@ shows_message_when_software_version_error(void **state) { prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); - prof_output_exact("Buddy1 (mobile) is online, \"I'm here\""); + assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); stbbr_for_query("jabber:iq:version", - "<iq id=\"*\" lang=\"en\" type=\"error\" to=\"stabber@localhost/profanity\" from=\"buddy1@localhost/laptop\">" - "<query xmlns=\"jabber:iq:version\"/>" - "<error code=\"503\" type=\"cancel\">" - "<service-unavailable xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>" + "<iq id='*' lang='en' type='error' to='stabber@localhost/profanity' from='buddy1@localhost/laptop'>" + "<query xmlns='jabber:iq:version'/>" + "<error code='503' type='cancel'>" + "<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>" "</error>" "</iq>" ); @@ -89,16 +89,16 @@ display_software_version_result_when_from_domainpart(void **state) { prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost\">" + "<presence to='stabber@localhost' from='buddy1@localhost'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); - prof_output_exact("Buddy1 is online, \"I'm here\""); + assert_true(prof_output_exact("Buddy1 is online, \"I'm here\"")); stbbr_for_query("jabber:iq:version", - "<iq id=\"*\" type=\"result\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"localhost\">" - "<query xmlns=\"jabber:iq:version\">" + "<iq id='*' type='result' lang='en' to='stabber@localhost/profanity' from='localhost'>" + "<query xmlns='jabber:iq:version'>" "<name>Some Gateway</name>" "<version>1.0</version>" "</query>" @@ -116,12 +116,12 @@ show_message_in_chat_window_when_no_resource(void **state) { prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); - prof_output_exact("Buddy1 (mobile) is online, \"I'm here\""); + assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); prof_input("/msg Buddy1"); prof_input("/software"); @@ -134,24 +134,24 @@ display_software_version_result_in_chat(void **state) { prof_connect(); stbbr_send( - "<presence to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\">" + "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); - prof_output_exact("Buddy1 (mobile) is online, \"I'm here\""); + assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); prof_input("/msg Buddy1"); stbbr_send( - "<message id=\"message1\" to=\"stabber@localhost\" from=\"buddy1@localhost/mobile\" type=\"chat\">" + "<message id='message1' to='stabber@localhost' from='buddy1@localhost/mobile' type='chat'>" "<body>Here's a message</body>" "</message>" ); - prof_output_exact("Here's a message"); + assert_true(prof_output_exact("Here's a message")); stbbr_for_query("jabber:iq:version", - "<iq id=\"*\" type=\"result\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"buddy1@localhost/mobile\">" - "<query xmlns=\"jabber:iq:version\">" + "<iq id='*' type='result' lang='en' to='stabber@localhost/profanity' from='buddy1@localhost/mobile'>" + "<query xmlns='jabber:iq:version'>" "<name>Profanity</name>" "<version>0.4.7dev.master.2cb2f83</version>" "</query>" |