about summary refs log tree commit diff stats
path: root/src/main.c
Commit message (Expand)AuthorAgeFilesLines
* Added -a (--account) option to man pageJames Booth2014-04-231-1/+1
* Removed inputwin functions from ui.hJames Booth2014-04-071-1/+0
* Removed statusbar functions from ui.hJames Booth2014-04-071-1/+0
* Removed titlebar functions from ui.hJames Booth2014-04-071-1/+0
* Tidied ui dependenciesJames Booth2014-04-061-0/+1
* Updated copyrightJames Booth2014-03-091-2/+2
* fixed build error when make run with -jN optionDmitry Podgorny2014-03-061-1/+1
* Mock otr module for cmd_otr testsJames Booth2014-02-161-0/+6
* Added mock_accounts and fixed testsJames Booth2013-12-261-0/+2
* Bind remaining ui functions in main.cJames Booth2013-12-231-0/+4
* Bind console functions in main.cJames Booth2013-12-231-0/+1
* Bind ui core functions in main.cJames Booth2013-12-221-0/+3
* Bind roster functions in main.cJames Booth2013-12-221-0/+1
* Bind presence functions in main.cJames Booth2013-12-221-0/+1
* Bind message functions in main.cJames Booth2013-12-221-0/+1
* Bind iq functions in main.cJames Booth2013-12-221-0/+1
* Bind capabilities functions in main.cJames Booth2013-12-221-0/+1
* Bind bookmark functions in main.cJames Booth2013-12-221-0/+1
* Bind jabber functions in main.cJames Booth2013-12-221-0/+9
* Merge remote-tracking branch 'tsenart/connect-on-startup'James Booth2013-11-071-1/+3
|\
| * Connect to an account on start-upTomás Senart2013-10-141-1/+3
|/
* Include git revision with -v outputJames Booth2013-09-171-2/+15
* Tidied #include'sJames Booth2013-02-021-2/+2
* Updated copyrightJames Booth2013-01-111-2/+2
* Fixed some memory leaksJames Booth2012-11-261-0/+1
* Removed trailing whitespace from src and testsJames Booth2012-10-211-5/+5
* Refactored profanity moduleJames Booth2012-10-021-2/+1
* Tidied all includesJames Booth2012-08-261-3/+1
* Customisable logging levelsJames Booth2012-08-191-2/+3
* Fixed definite memory leaksJames Booth2012-07-311-0/+2
* Function signatures across linesJames Booth2012-07-241-1/+2
* Command line args and welcome messageJames Booth2012-07-201-13/+29
* Added autobuild toolsJames Booth2012-07-011-0/+52
kt">void **state) { prof_connect(); stbbr_send( "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); prof_input("/software buddy1@localhost/mobile"); assert_true(stbbr_received( "<iq id='*' to='buddy1@localhost/mobile' type='get'>" "<query xmlns='jabber:iq:version'/>" "</iq>" )); } void display_software_version_result(void **state) { prof_connect(); stbbr_send( "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); 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'>" "<name>Profanity</name>" "<version>0.4.7dev.master.2cb2f83</version>" "</query>" "</iq>" ); prof_input("/software buddy1@localhost/mobile"); // assert_true(prof_output_exact("buddy1@localhost/mobile:")); // assert_true(prof_output_exact("Name : Profanity")); assert_true(prof_output_exact("Version : 0.4.7dev.master.2cb2f83")); } void shows_message_when_software_version_error(void **state) { prof_connect(); stbbr_send( "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); 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'/>" "</error>" "</iq>" ); prof_input("/software buddy1@localhost/laptop"); assert_true(prof_output_exact("Could not get software version: service-unavailable")); } // Typical use case for gateways that don't support resources void display_software_version_result_when_from_domainpart(void **state) { prof_connect(); stbbr_send( "<presence to='stabber@localhost' from='buddy1@localhost'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); 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'>" "<name>Some Gateway</name>" "<version>1.0</version>" "</query>" "</iq>" ); prof_input("/software buddy1@localhost/__prof_default"); // assert_true(prof_output_exact("buddy1@localhost/__prof_default:")); // assert_true(prof_output_exact("Name : Some Gateway")); assert_true(prof_output_exact("Version : 1.0")); } void show_message_in_chat_window_when_no_resource(void **state) { prof_connect(); stbbr_send( "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\"")); prof_input("/msg Buddy1"); prof_input("/software"); assert_true(prof_output_exact("Unknown resource for /software command.")); } void display_software_version_result_in_chat(void **state) { prof_connect(); stbbr_send( "<presence to='stabber@localhost' from='buddy1@localhost/mobile'>" "<priority>10</priority>" "<status>I'm here</status>" "</presence>" ); 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'>" "<body>Here's a message</body>" "</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'>" "<name>Profanity</name>" "<version>0.4.7dev.master.2cb2f83</version>" "</query>" "</iq>" ); prof_input("/software"); // assert_true(prof_output_exact("buddy1@localhost/mobile:")); // assert_true(prof_output_exact("Name : Profanity")); assert_true(prof_output_exact("Version : 0.4.7dev.master.2cb2f83")); }