Changeset 13390 in josm


Ignore:
Timestamp:
2018-02-07T02:01:12+01:00 (3 months ago)
Author:
Don-vip
Message:

fix #15869 - make SimilarNamedWays check aware of all Unicode numbers

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java

    r12390 r13390  
    5454        // FIXME: hardcode these rules for now. Replace them with preferences later
    5555        // See https://josm.openstreetmap.de/ticket/3733#comment:19
    56         addRegExprRule("\\d+", "0"); // Highway 66
     56        addRegExprRule("\\pN+", "0"); // Unicode numbers: matches "Highway 66" but also persian numbers
    5757        addRegExprRule("\\d+(st|nd|rd|th)", "0st"); // 3rd Ave
    5858        addRegExprRule("^[A-Z] ", "X"); // E Street
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SimilarNamedWaysTest.java

    r12283 r13390  
    106106        checkSimilarity("different number length", "track 9", "track 10", false);
    107107        checkSimilarity("multiple numbers", "track 8 - 9", "track 10 - 11", false);
     108        // persian numbers, see #15869
     109        checkSimilarity("persian numbers", "بن‌بست نیلوفر ۵", "بن‌بست نیلوفر ۶", false);
    108110
    109111        checkSimilarity("1st and 2nd", "1st Street", "2nd Street", false);
Note: See TracChangeset for help on using the changeset viewer.