From 7f98e013e1ba103f3c9b4606be369f49673a2711 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 30 Dec 2015 00:12:24 +0000 Subject: Use single quotes in functional test stanzas --- tests/functionaltests/proftest.c | 12 ++-- tests/functionaltests/test_carbons.c | 34 ++++----- tests/functionaltests/test_chat_session.c | 44 ++++++------ tests/functionaltests/test_connect.c | 20 +++--- tests/functionaltests/test_message.c | 8 +-- tests/functionaltests/test_muc.c | 110 +++++++++++++++--------------- tests/functionaltests/test_ping.c | 18 ++--- tests/functionaltests/test_presence.c | 56 +++++++-------- tests/functionaltests/test_receipts.c | 12 ++-- tests/functionaltests/test_rooms.c | 12 ++-- tests/functionaltests/test_roster.c | 48 ++++++------- tests/functionaltests/test_software.c | 56 +++++++-------- 12 files changed, 215 insertions(+), 215 deletions(-) (limited to 'tests/functionaltests') 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( - "" - "" + "" + "" ); 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", - "" + "" "0" - "" + "" "" ); @@ -260,7 +260,7 @@ void prof_connect(void) { prof_connect_with_roster( - "" - "" + "" + "" ); } 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( - "" + "" )); } @@ -31,7 +31,7 @@ connect_with_carbons_enabled(void **state) prof_connect(); assert_true(stbbr_received( - "" + "" )); } @@ -45,7 +45,7 @@ send_disable_carbons(void **state) prof_input("/carbons off"); assert_true(stbbr_received( - "" + "" )); } @@ -56,24 +56,24 @@ receive_carbon(void **state) prof_connect(); assert_true(stbbr_received( - "" + "" )); stbbr_send( - "" + "" "10" "On my mobile" "" ); 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( - "" - "" - "" - "" + "" + "" + "" + "" "test carbon from recipient" "" "" @@ -91,24 +91,24 @@ receive_self_carbon(void **state) prof_connect(); assert_true(stbbr_received( - "" + "" )); stbbr_send( - "" + "" "10" "On my mobile" "" ); 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( - "" - "" - "" - "" + "" + "" + "" + "" "self sent carbon" "" "" 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( - "" + "" "Hi there" "" )); @@ -31,7 +31,7 @@ sends_message_to_barejid_when_contact_online(void **state) prof_connect(); stbbr_send( - "" + "" "10" "" ); @@ -40,7 +40,7 @@ sends_message_to_barejid_when_contact_online(void **state) prof_input("/msg buddy1@localhost Hi there"); assert_true(stbbr_received( - "" + "" "Hi there" "" )); @@ -52,14 +52,14 @@ sends_message_to_fulljid_when_received_from_fulljid(void **state) prof_connect(); stbbr_send( - "" + "" "10" "" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "" + "" "First 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( - "" + "" "Hi there" "" )); @@ -80,14 +80,14 @@ sends_subsequent_messages_to_fulljid(void **state) prof_connect(); stbbr_send( - "" + "" "10" "" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "" + "" "First message" "" ); @@ -95,21 +95,21 @@ sends_subsequent_messages_to_fulljid(void **state) prof_input("/msg buddy1@localhost Outgoing 1"); assert_true(stbbr_received( - "" + "" "Outgoing 1" "" )); prof_input("/msg buddy1@localhost Outgoing 2"); assert_true(stbbr_received( - "" + "" "Outgoing 2" "" )); prof_input("/msg buddy1@localhost Outgoing 3"); assert_true(stbbr_received( - "" + "" "Outgoing 3" "" )); @@ -121,14 +121,14 @@ resets_to_barejid_after_presence_received(void **state) prof_connect(); stbbr_send( - "" + "" "10" "" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "" + "" "First message" "" ); @@ -136,13 +136,13 @@ resets_to_barejid_after_presence_received(void **state) prof_input("/msg buddy1@localhost Outgoing 1"); assert_true(stbbr_received( - "" + "" "Outgoing 1" "" )); stbbr_send( - "" + "" "5" "dnd" "" @@ -151,7 +151,7 @@ resets_to_barejid_after_presence_received(void **state) prof_input("/msg buddy1@localhost Outgoing 2"); assert_true(stbbr_received( - "" + "" "Outgoing 2" "" )); @@ -163,14 +163,14 @@ new_session_when_message_received_from_different_fulljid(void **state) prof_connect(); stbbr_send( - "" + "" "10" "" ); assert_true(prof_output_exact("Buddy1 (mobile) is online")); stbbr_send( - "" + "" "8" "away" "" @@ -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( - "" + "" "From first resource" "" ); @@ -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( - "" + "" "Outgoing 1" "" )); stbbr_send( - "" + "" "From second resource" "" ); @@ -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( - "" + "" "Outgoing 2" "" )); 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( - "" + "" )); } @@ -27,8 +27,8 @@ connect_jid_sends_presence_after_receiving_roster(void **state) prof_connect(); assert_true(stbbr_received( - "" - "" + "" + "" "" )); } @@ -39,9 +39,9 @@ connect_jid_requests_bookmarks(void **state) prof_connect(); assert_true(stbbr_received( - "" - "" - "" + "" + "" + "" "" "" )); @@ -62,7 +62,7 @@ connect_shows_presence_updates(void **state) prof_connect(); stbbr_send( - "" + "" "dnd" "busy!" "" @@ -70,7 +70,7 @@ connect_shows_presence_updates(void **state) assert_true(prof_output_exact("Buddy1 (mobile) is dnd, \"busy!\"")); stbbr_send( - "" + "" "chat" "Talk to me!" "" @@ -78,7 +78,7 @@ connect_shows_presence_updates(void **state) assert_true(prof_output_exact("Buddy1 (laptop) is chat, \"Talk to me!\"")); stbbr_send( - "" + "" "away" "Out of office" "" @@ -86,7 +86,7 @@ connect_shows_presence_updates(void **state) assert_true(prof_output_exact("Buddy2 (work) is away, \"Out of office\"")); stbbr_send( - "" + "" "xa" "Gone :(" "" 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( - "" + "" "Hi there" "" )); @@ -33,7 +33,7 @@ message_receive_console(void **state) prof_connect(); stbbr_send( - "" + "" "How are you?" "" ); @@ -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( - "" + "" "How are you?" "" ); 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( - "" - "" - "" + "" + "" + "" "" )); } @@ -34,9 +34,9 @@ sends_room_join_with_default_muc_service(void **state) prof_input("/join testroom"); assert_true(stbbr_last_received( - "" - "" - "" + "" + "" + "" "" )); } @@ -49,9 +49,9 @@ sends_room_join_with_nick(void **state) prof_input("/join testroom@conference.localhost nick testnick"); assert_true(stbbr_last_received( - "" - "" - "" + "" + "" + "" "" )); } @@ -64,11 +64,11 @@ sends_room_join_with_password(void **state) prof_input("/join testroom@conference.localhost password testpassword"); assert_true(stbbr_last_received( - "" - "" + "" + "" "testpassword" "" - "" + "" "" )); } @@ -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( - "" - "" + "" + "" "testpassword" "" - "" + "" "" )); } @@ -96,12 +96,12 @@ shows_role_and_affiliation_on_join(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "" - "" - "" - "" + "" + "" + "" + "" "" - "" + "" "" ); @@ -116,12 +116,12 @@ shows_subject_on_join(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "" - "" - "" - "" + "" + "" + "" + "" "" - "" + "" "" ); @@ -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( - "" + "" "Test room subject" "anothernick has set the subject to: Test room subject" "" @@ -144,12 +144,12 @@ shows_history_message(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "" - "" - "" - "" + "" + "" + "" + "" "" - "" + "" "" ); @@ -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( - "" + "" "an old message" - "" - "" + "" + "" "" ); @@ -173,12 +173,12 @@ shows_occupant_join(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "" - "" - "" - "" + "" + "" + "" + "" "" - "" + "" "" ); @@ -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( - "" - "" - "" + "" + "" + "" "" "" ); @@ -202,12 +202,12 @@ shows_message(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "" - "" - "" - "" + "" + "" + "" + "" "" - "" + "" "" ); @@ -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( - "" + "" "a new message" "" ); @@ -229,12 +229,12 @@ shows_message_in_console_when_window_not_focussed(void **state) prof_connect(); stbbr_for_id("prof_join_2", - "" - "" - "" - "" + "" + "" + "" + "" "" - "" + "" "" ); @@ -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( - "" + "" "a new 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", - "" + "" ); stbbr_for_id("prof_ping_3", - "" + "" ); prof_connect(); prof_input("/ping"); assert_true(stbbr_received( - "" - "" + "" + "" "" )); assert_true(prof_output_exact("Ping response from server")); prof_input("/ping"); assert_true(stbbr_received( - "" - "" + "" + "" "" )); assert_true(prof_output_exact("Ping response from server")); @@ -46,12 +46,12 @@ ping_responds(void **state) prof_connect(); stbbr_send( - "" - "" + "" + "" "" ); assert_true(stbbr_received( - "" + "" )); } 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( - "" - "" + "" + "" "" )); @@ -35,9 +35,9 @@ presence_online_with_message(void **state) prof_input("/online \"Hi there\""); assert_true(stbbr_received( - "" + "" "Hi there" - "" + "" "" )); @@ -52,9 +52,9 @@ presence_away(void **state) prof_input("/away"); assert_true(stbbr_received( - "" + "" "away" - "" + "" "" )); @@ -69,10 +69,10 @@ presence_away_with_message(void **state) prof_input("/away \"I'm not here for a bit\""); assert_true(stbbr_received( - "" + "" "away" "I'm not here for a bit" - "" + "" "" )); @@ -87,9 +87,9 @@ presence_xa(void **state) prof_input("/xa"); assert_true(stbbr_received( - "" + "" "xa" - "" + "" "" )); @@ -104,10 +104,10 @@ presence_xa_with_message(void **state) prof_input("/xa \"Gone to the shops\""); assert_true(stbbr_received( - "" + "" "xa" "Gone to the shops" - "" + "" "" )); @@ -122,9 +122,9 @@ presence_dnd(void **state) prof_input("/dnd"); assert_true(stbbr_received( - "" + "" "dnd" - "" + "" "" )); @@ -139,10 +139,10 @@ presence_dnd_with_message(void **state) prof_input("/dnd \"Working\""); assert_true(stbbr_received( - "" + "" "dnd" "Working" - "" + "" "" )); @@ -157,9 +157,9 @@ presence_chat(void **state) prof_input("/chat"); assert_true(stbbr_received( - "" + "" "chat" - "" + "" "" )); @@ -174,10 +174,10 @@ presence_chat_with_message(void **state) prof_input("/chat \"Free to talk\""); assert_true(stbbr_received( - "" + "" "chat" "Free to talk" - "" + "" "" )); @@ -192,9 +192,9 @@ presence_set_priority(void **state) prof_input("/priority 25"); assert_true(stbbr_received( - "" + "" "25" - "" + "" "" )); @@ -208,20 +208,20 @@ presence_includes_priority(void **state) prof_input("/priority 25"); assert_true(stbbr_received( - "" + "" "25" - "" + "" "" )); assert_true(prof_output_exact("Priority set to 25.")); prof_input("/chat \"Free to talk\""); assert_true(stbbr_received( - "" + "" "25" "chat" "Free to talk" - "" + "" "" )); 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( - "" + "" "10" "I'm here" "" @@ -249,7 +249,7 @@ presence_missing_resource_defaults(void **state) prof_connect(); stbbr_send( - "" + "" "15" "My status" "" 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( - "" + "" "Hi there" - "" + "" "" )); } @@ -36,15 +36,15 @@ send_receipt_on_request(void **state) prof_connect(); stbbr_send( - "" + "" "Wants a receipt" - "" + "" "" ); assert_true(stbbr_received( - "" - "" + "" + "" "" )); } 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", - "" - "" - "" - "" + "" + "" + "" + "" "" "" ); @@ -31,8 +31,8 @@ rooms_query(void **state) assert_true(prof_output_exact("hangout@conference.localhost, (Another chat room)")); assert_true(stbbr_last_received( - "" - "" + "" + "" "" )); } 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", - "" - "" - "" + "" + "" + "" "" "" ); @@ -27,9 +27,9 @@ sends_new_item(void **state) prof_input("/roster add bob@localhost"); assert_true(stbbr_received( - "" - "" - "" + "" + "" + "" "" "" )); @@ -43,9 +43,9 @@ sends_new_item_nick(void **state) prof_connect(); stbbr_for_query("jabber:iq:roster", - "" - "" - "" + "" + "" + "" "" "" ); @@ -53,9 +53,9 @@ sends_new_item_nick(void **state) prof_input("/roster add bob@localhost Bobby"); assert_true(stbbr_received( - "" - "" - "" + "" + "" + "" "" "" )); @@ -67,14 +67,14 @@ void sends_remove_item(void **state) { prof_connect_with_roster( - "" - "" + "" + "" ); stbbr_for_query("jabber:iq:roster", - "" - "" - "" + "" + "" + "" "" "" ); @@ -82,9 +82,9 @@ sends_remove_item(void **state) prof_input("/roster remove buddy1@localhost"); assert_true(stbbr_received( - "" - "" - "" + "" + "" + "" "" "" )); @@ -96,7 +96,7 @@ void sends_nick_change(void **state) { prof_connect_with_roster( - "" + "" ); 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( - "" - "" - "" + "" + "" + "" "" "" )); 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( - "" + "" "10" "I'm here" "" ); - 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( - "" - "" + assert_true(stbbr_received( + "" + "" "" - ); + )); } void @@ -36,16 +36,16 @@ display_software_version_result(void **state) { prof_connect(); stbbr_send( - "" + "" "10" "I'm here" "" ); - 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", - "" - "" + "" + "" "Profanity" "0.4.7dev.master.2cb2f83" "" @@ -63,18 +63,18 @@ shows_message_when_software_version_error(void **state) { prof_connect(); stbbr_send( - "" + "" "10" "I'm here" "" ); - 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", - "" - "" - "" - "" + "" + "" + "" + "" "" "" ); @@ -89,16 +89,16 @@ display_software_version_result_when_from_domainpart(void **state) { prof_connect(); stbbr_send( - "" + "" "10" "I'm here" "" ); - 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", - "" - "" + "" + "" "Some Gateway" "1.0" "" @@ -116,12 +116,12 @@ show_message_in_chat_window_when_no_resource(void **state) { prof_connect(); stbbr_send( - "" + "" "10" "I'm here" "" ); - 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( - "" + "" "10" "I'm here" "" ); - 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( - "" + "" "Here's a message" "" ); - prof_output_exact("Here's a message"); + assert_true(prof_output_exact("Here's a message")); stbbr_for_query("jabber:iq:version", - "" - "" + "" + "" "Profanity" "0.4.7dev.master.2cb2f83" "" -- cgit 1.4.1-2-gfad0