im.pidgin.pidgin: 7e6f3aa974ad4672e16bd0ac3839d416c87160f1

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Jan 24 20:45:47 EST 2008


-----------------------------------------------------------------
Revision: 7e6f3aa974ad4672e16bd0ac3839d416c87160f1
Ancestor: 169c2e4d8c29bfa276d6422558df2e97564159b5
Author: markdoliner at pidgin.im
Date: 2008-01-25T01:40:51
Branch: im.pidgin.pidgin

Modified files:
        libpurple/tests/test_util.c

ChangeLog: 

Add a few tets to make sure we're catching some invalid email formats

-------------- next part --------------
============================================================
--- libpurple/tests/test_util.c	ba2e94b404cad9ad2f4d913aef40e9fa0227e198
+++ libpurple/tests/test_util.c	a941edfd06d7969ea806e2d9b8a872067a41d3e0
@@ -71,6 +71,13 @@ START_TEST(test_util_email_is_valid)
 START_TEST(test_util_email_is_valid)
 {
 	fail_unless(purple_email_is_valid("purple-devel at lists.sf.net"));
+	fail_if(purple_email_is_valid("purple-devel@@lists.sf.net"));
+	fail_if(purple_email_is_valid("purple at devel@lists.sf.net"));
+	fail_if(purple_email_is_valid("purple-devel at list..sf.net"));
+	fail_if(purple_email_is_valid("purple-devel"));
+	fail_if(purple_email_is_valid("@lists.sf.net"));
+	fail_if(purple_email_is_valid(""));
+	fail_if(purple_email_is_valid("totally bogus"));
 }
 END_TEST
 


More information about the Commits mailing list