comparison libpurple/tests/test_jabber_jutil.c @ 28247:bc87a89e4401

merge of '9ce1a7ac92f523b7b5b9983746ae57ee1fac1a67' and 'ebf771e2c74addf4821a643a9c9179f4adc67c3b'
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 08 Sep 2009 02:23:49 +0000
parents 22c65c1090a8
children 4cb882afbd6f
comparison
equal deleted inserted replaced
28238:1f0b2af9e2b8 28247:bc87a89e4401
151 /* U+04E9 to U+04E9 */ 151 /* U+04E9 to U+04E9 */
152 assert_jid_parts("paul", "өarkrain42.org", "paul@Өarkrain42.org"); 152 assert_jid_parts("paul", "өarkrain42.org", "paul@Өarkrain42.org");
153 } 153 }
154 END_TEST 154 END_TEST
155 155
156 START_TEST(test_jabber_normalize)
157 {
158 assert_string_equal("paul@darkrain42.org", jabber_normalize(NULL, "PaUL@DaRkRain42.org"));
159 assert_string_equal("paul@darkrain42.org", jabber_normalize(NULL, "PaUL@DaRkRain42.org/"));
160 assert_string_equal("paul@darkrain42.org", jabber_normalize(NULL, "PaUL@DaRkRain42.org/resource"));
161 }
162 END_TEST
163
156 Suite * 164 Suite *
157 jabber_jutil_suite(void) 165 jabber_jutil_suite(void)
158 { 166 {
159 Suite *s = suite_create("Jabber Utility Functions"); 167 Suite *s = suite_create("Jabber Utility Functions");
160 168
170 tc = tcase_create("JID validate"); 178 tc = tcase_create("JID validate");
171 tcase_add_test(tc, test_nodeprep_validate); 179 tcase_add_test(tc, test_nodeprep_validate);
172 tcase_add_test(tc, test_nodeprep_validate_illegal_chars); 180 tcase_add_test(tc, test_nodeprep_validate_illegal_chars);
173 tcase_add_test(tc, test_nodeprep_validate_too_long); 181 tcase_add_test(tc, test_nodeprep_validate_too_long);
174 tcase_add_test(tc, test_jabber_id_new); 182 tcase_add_test(tc, test_jabber_id_new);
183 tcase_add_test(tc, test_jabber_normalize);
175 suite_add_tcase(s, tc); 184 suite_add_tcase(s, tc);
176 185
177 return s; 186 return s;
178 } 187 }