Changeset 19351 in josm for trunk/test


Ignore:
Timestamp:
2025-03-21T17:29:04+01:00 (4 days ago)
Author:
stoecker
Message:

readd the country code TLDs in the correct section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java

    r19223 r19351  
    110110            Map<String, String> missingTLD = new TreeMap<>(); // stores entry and comments as String[]
    111111            Map<String, String> missingCC = new TreeMap<>();
     112            Map<String, String> allTLD = new TreeMap<>(); // stores entry and comments as String[]
     113            Map<String, String> allCC = new TreeMap<>(); // stores entry and comments as String[]
    112114            while ((line = br.readLine()) != null) {
    113115                if (!line.startsWith("#")) {
     
    121123                    if (!dv.isValidTld(asciiTld)) {
    122124                        String[] info = htmlInfo.get(asciiTld);
     125                        String type = info[0];
     126                        String comment = info[1];
     127                        if ("country-code".equals(type)) { // Which list to use?
     128                            allCC.put(asciiTld, unicodeTld + " " + comment);
     129                            if (generateUnicodeTlds) {
     130                                allCC.put(unicodeTld, asciiTld + " " + comment);
     131                            }
     132                        } else {
     133                            allTLD.put(asciiTld, unicodeTld + " " + comment);
     134                            if (generateUnicodeTlds) {
     135                                allTLD.put(unicodeTld, asciiTld + " " + comment);
     136                            }
     137                        }
    123138                        if (info != null) {
    124                             String type = info[0];
    125                             String comment = info[1];
    126139                            if ("country-code".equals(type)) { // Which list to use?
    127140                                missingCC.put(asciiTld, unicodeTld + " " + comment);
     
    158171                }
    159172            }
     173            printMap(header, allTLD, "allTLD");
     174            printMap(header, allCC, "allCC");
    160175            if (!missingTLD.isEmpty()) {
    161176                printMap(header, missingTLD, "TLD");
Note: See TracChangeset for help on using the changeset viewer.