commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1128401 - /commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
Date Fri, 27 May 2011 17:17:20 GMT
Author: nick
Date: Fri May 27 17:17:20 2011
New Revision: 1128401

URL: http://svn.apache.org/viewvc?rev=1128401&view=rev
Log:
VALIDATOR-275 - Add a unit test that shows the new routines validator fixes the + in domain
name issue

Modified:
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java

Modified: commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java?rev=1128401&r1=1128400&r2=1128401&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
(original)
+++ commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
Fri May 27 17:17:20 2011
@@ -125,8 +125,12 @@ public class EmailValidatorTest extends 
         // But not in the domain name.
         assertFalse(validator.isValid("andy@o'reilly.data-workshop.com"));
 
+        // The + character is valid in an email username.
         assertTrue(validator.isValid("foo+bar@i.am.not.in.us.example.com"));
 
+        // But not in the domain name
+        assertFalse(validator.isValid("foo+bar@example+3.com"));
+
         // Domains with only special characters aren't allowed (VALIDATOR-286) 
         assertFalse(validator.isValid("test@%*.com"));
         assertFalse(validator.isValid("test@^&#.com"));



Mime
View raw message