#include #include "prof_cmocka.h" #include #include #include #include "proftest.h" void does_not_send_receipt_request_to_barejid(void** state) { prof_input("/receipts request on"); prof_connect(); prof_input("/msg somejid@someserver.com Hi there"); assert_true(stbbr_received( "" "Hi there" "")); } void send_receipt_request(void** state) { prof_input("/receipts request on"); prof_connect(); stbbr_for_id("iq:*", "" "" "" "" "" ""); stbbr_send( "" "15" "My status" "" ""); assert_true(prof_output_regex("Buddy1 \\(laptop\\) is online, \"My status\"")); prof_input("/msg Buddy1"); prof_input("/resource set laptop"); prof_input("Hi there, where is my receipt?"); assert_true(stbbr_received( "" "Hi there, where is my receipt?" "" "")); } void send_receipt_on_request(void** state) { prof_input("/receipts send on"); prof_connect(); stbbr_send( "" "Wants a receipt" "" ""); assert_true(stbbr_received( "" "" "")); }