mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added carbons enable/disable tests
This commit is contained in:
parent
84cc67fa88
commit
f3326bf105
@ -118,6 +118,12 @@ int main(int argc, char* argv[]) {
|
|||||||
unit_test_setup_teardown(send_enable_carbons,
|
unit_test_setup_teardown(send_enable_carbons,
|
||||||
init_prof_test,
|
init_prof_test,
|
||||||
close_prof_test),
|
close_prof_test),
|
||||||
|
unit_test_setup_teardown(connect_with_carbons_enabled,
|
||||||
|
init_prof_test,
|
||||||
|
close_prof_test),
|
||||||
|
unit_test_setup_teardown(send_disable_carbons,
|
||||||
|
init_prof_test,
|
||||||
|
close_prof_test),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(all_tests);
|
return run_tests(all_tests);
|
||||||
|
@ -234,5 +234,5 @@ prof_connect(void)
|
|||||||
exp_timeout = 30;
|
exp_timeout = 30;
|
||||||
assert_true(prof_output_regex("stabber@localhost logged in successfully, .+online.+ \\(priority 0\\)\\."));
|
assert_true(prof_output_regex("stabber@localhost logged in successfully, .+online.+ \\(priority 0\\)\\."));
|
||||||
exp_timeout = 10;
|
exp_timeout = 10;
|
||||||
stbbr_wait_for("prof_presence_1");
|
stbbr_wait_for("prof_presence_*");
|
||||||
}
|
}
|
||||||
|
@ -22,3 +22,29 @@ send_enable_carbons(void **state)
|
|||||||
"<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>"
|
"<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
connect_with_carbons_enabled(void **state)
|
||||||
|
{
|
||||||
|
prof_input("/carbons on");
|
||||||
|
|
||||||
|
prof_connect();
|
||||||
|
|
||||||
|
assert_true(stbbr_received(
|
||||||
|
"<iq id=\"*\" type=\"set\"><enable xmlns=\"urn:xmpp:carbons:2\"/></iq>"
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
send_disable_carbons(void **state)
|
||||||
|
{
|
||||||
|
prof_input("/carbons on");
|
||||||
|
|
||||||
|
prof_connect();
|
||||||
|
|
||||||
|
prof_input("/carbons off");
|
||||||
|
|
||||||
|
assert_true(stbbr_received(
|
||||||
|
"<iq id=\"*\" type=\"set\"><disable xmlns=\"urn:xmpp:carbons:2\"/></iq>"
|
||||||
|
));
|
||||||
|
}
|
||||||
|
@ -1 +1,3 @@
|
|||||||
void send_enable_carbons(void **state);
|
void send_enable_carbons(void **state);
|
||||||
|
void connect_with_carbons_enabled(void **state);
|
||||||
|
void send_disable_carbons(void **state);
|
||||||
|
Loading…
Reference in New Issue
Block a user