Use single quotes in functional test stanzas

This commit is contained in:
James Booth
2015-12-30 00:12:24 +00:00
parent 6a8656a06b
commit 7f98e013e1
12 changed files with 215 additions and 215 deletions

View File

@@ -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>"