comparison libpurple/tests/test_util.c @ 22197:a67c0aa4db9c

Add a few tets to make sure we're catching some invalid email formats
author Mark Doliner <mark@kingant.net>
date Fri, 25 Jan 2008 01:40:51 +0000
parents 18fb032a602a
children 5aacf801f6b6
comparison
equal deleted inserted replaced
22196:6c7cf4654d10 22197:a67c0aa4db9c
69 END_TEST 69 END_TEST
70 70
71 START_TEST(test_util_email_is_valid) 71 START_TEST(test_util_email_is_valid)
72 { 72 {
73 fail_unless(purple_email_is_valid("purple-devel@lists.sf.net")); 73 fail_unless(purple_email_is_valid("purple-devel@lists.sf.net"));
74 fail_if(purple_email_is_valid("purple-devel@@lists.sf.net"));
75 fail_if(purple_email_is_valid("purple@devel@lists.sf.net"));
76 fail_if(purple_email_is_valid("purple-devel@list..sf.net"));
77 fail_if(purple_email_is_valid("purple-devel"));
78 fail_if(purple_email_is_valid("@lists.sf.net"));
79 fail_if(purple_email_is_valid(""));
80 fail_if(purple_email_is_valid("totally bogus"));
74 } 81 }
75 END_TEST 82 END_TEST
76 83
77 START_TEST(test_util_str_to_time) 84 START_TEST(test_util_str_to_time)
78 { 85 {