commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1685243 - /commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
Date Sat, 13 Jun 2015 12:13:37 GMT
Author: sebb
Date: Sat Jun 13 12:13:36 2015
New Revision: 1685243

URL: http://svn.apache.org/r1685243
Log:
List HTML entries not found in ASCII database

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

Modified: commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java?rev=1685243&r1=1685242&r2=1685243&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
(original)
+++ commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
Sat Jun 13 12:13:36 2015
@@ -361,6 +361,12 @@ public class DomainValidatorTest extends
             }
         }
         br.close();
+        // List html entries not in TLD text list
+        for(String key : (new TreeMap<String, String[]>(htmlInfo)).keySet()) {
+            if (!ianaTlds.contains(key)) {
+                System.err.println("Expected to find text entry for html: "+key);
+            }
+        }
         if (!missingTLD.isEmpty()) {
             printMap(header, missingTLD, "TLD");
         }
@@ -426,8 +432,13 @@ public class DomainValidatorTest extends
                     if (n.lookingAt()) {
                         com = n.group(1);
                     }
-                    info.put(dom.toLowerCase(Locale.ENGLISH), new String[]{typ, com});
-//                    System.out.println(dom + " " + typ + " " +com);
+                    // Don't save unused entries
+                    if (com.contains("Not assigned") || com.contains("Retired") || typ.equals("test"))
{
+//                        System.out.println(dom + " " + typ + " " +com);
+                    } else {
+                        info.put(dom.toLowerCase(Locale.ENGLISH), new String[]{typ, com});
+//                        System.out.println(dom + " " + typ + " " +com);
+                    }
                 }
             }
         }



Mime
View raw message