Changeset af97b23
- Timestamp:
- 2008-02-16T13:17:52Z (17 years ago)
- Branches:
- master
- Children:
- ca60550
- Parents:
- 2799ff9
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/sasl.c
r2799ff9 raf97b23 21 21 * * 22 22 \***************************************************************************/ 23 24 #include <ctype.h> 23 25 24 26 #include "jabber.h" … … 107 109 } 108 110 109 static char *sasl_get_part( char *data, char *field ) 111 /* Non-static function, but not mentioned in jabber.h because it's for internal 112 use, just that the unittest should be able to reach it... */ 113 char *sasl_get_part( char *data, char *field ) 110 114 { 111 115 int i, len; 112 116 113 117 len = strlen( field ); 118 119 while( isspace( *data ) || *data == ',' ) 120 data ++; 114 121 115 122 if( g_strncasecmp( data, field, len ) == 0 && data[len] == '=' ) … … 129 136 } 130 137 131 /* If we got a comma, we got a new field. Check it. */ 132 if( data[i] == ',' && 133 g_strncasecmp( data + i + 1, field, len ) == 0 && 134 data[i+len+1] == '=' ) 138 /* If we got a comma, we got a new field. Check it, 139 find the next key after it. */ 140 if( data[i] == ',' ) 135 141 { 136 i += len + 2; 137 break; 142 while( isspace( data[i] ) || data[i] == ',' ) 143 i ++; 144 145 if( g_strncasecmp( data + i, field, len ) == 0 && 146 data[i+len] == '=' ) 147 { 148 i += len + 1; 149 break; 150 } 138 151 } 139 152 } -
tests/Makefile
r2799ff9 raf97b23 11 11 distclean: clean 12 12 13 main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o 13 main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o 14 14 15 test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc.o check_help.o check_user.o check_crypting.o check_set.o 15 test_objs = check.o check_util.o check_nick.o check_md5.o check_arc.o check_irc.o check_help.o check_user.o check_crypting.o check_set.o check_jabber_sasl.o 16 16 17 17 check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o -
tests/check.c
r2799ff9 raf97b23 66 66 Suite *set_suite(void); 67 67 68 /* From check_jabber_sasl.c */ 69 Suite *jabber_sasl_suite(void); 70 68 71 int main (int argc, char **argv) 69 72 { … … 111 114 srunner_add_suite(sr, crypting_suite()); 112 115 srunner_add_suite(sr, set_suite()); 116 srunner_add_suite(sr, jabber_sasl_suite()); 113 117 if (no_fork) 114 118 srunner_set_fork_status(sr, CK_NOFORK);
Note: See TracChangeset
for help on using the changeset viewer.