#include #include "prof_cmocka.h" #include #include #include #include "proftest.h" void disco_info_server_on_explicit_request(void **state) { // prof_connect_with_roster( // "" // ); // stbbr_for_query("http://jabber.org/protocol/disco#info", // "" // "" // "" // "" // "" // "" // "" // "" // ); // prof_input("/disco info"); // defaults to server domain // assert_true(prof_output_regex("Service discovery info for localhost")); // assert_true(prof_output_regex("Features:")); // assert_true(prof_output_regex("urn:xmpp:ping")); // assert_true(stbbr_received( // "" // "" // "" // )); } void disco_items_with_node(void **state) { // prof_connect_with_roster( // "" // ); // stbbr_for_query("http://jabber.org/protocol/disco#items", // "" // "" // "" // "" // "" // ); // // Assuming /disco supports node= somehow; if not, this tests manual call path // // Adjust if cproof has extended syntax or test via direct call in fixture // prof_input("/disco items pubsub.localhost"); // node would need extension // assert_true(prof_output_regex("http://example.org/tune/user/stabber@localhost/current")); // assert_true(stbbr_received( // "" // "" // "" // )); } void disco_info_error_item_not_found(void **state) { // prof_connect_with_roster( // "" // ); // stbbr_for_query("http://jabber.org/protocol/disco#info", // "" // "" // "" // "" // "" // "" // ); // prof_input("/disco info ghost.service"); // assert_true(prof_output_regex("not found") || // prof_output_regex("Item not found") || // prof_output_regex("error")); // assert_true(stbbr_received( // "" // "" // "" // )); } void no_automatic_disco_after_connect(void **state) { // prof_connect_with_roster( // "" // ); // // After connect + roster + initial presence, assert *no* disco#* IQ was sent // // except possibly to own bare JID or server — but according to code, none auto // assert_false(stbbr_received( // "" // "" // "" // )); // assert_false(stbbr_received( // "" // "" // "" // )); }