#include #include #include #include #include #include #include #include #include #include "proftest.h" void send_enable_carbons(void **state) { prof_connect(); prof_input("/carbons on"); assert_true(stbbr_received( "" )); } void connect_with_carbons_enabled(void **state) { prof_input("/carbons on"); prof_connect(); assert_true(stbbr_received( "" )); } void send_disable_carbons(void **state) { prof_input("/carbons on"); prof_connect(); prof_input("/carbons off"); assert_true(stbbr_received( "" )); } void receive_carbon(void **state) { prof_input("/carbons on"); 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"); stbbr_send( "" "" "" "" "test carbon from recipient" "" "" "" "" ); assert_true(prof_output_regex("Buddy1/mobile: .+test carbon from recipient")); } void receive_self_carbon(void **state) { prof_input("/carbons on"); 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"); stbbr_send( "" "" "" "" "self sent carbon" "" "" "" "" ); assert_true(prof_output_regex("me: .+self sent carbon")); }