Changeset 13994 in josm for trunk/test


Ignore:
Timestamp:
2018-07-01T16:09:11+02:00 (13 months ago)
Author:
Don-vip
Message:

fix #16447 - Improve detection of changeset hashtags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetCommentModelTest.java

    r13109 r13994  
    4040        model.setComment(" https://example.com/#map ");
    4141        assertEquals(Collections.emptyList(), model.findHashTags());
     42        model.setComment("#59606086");
     43        assertEquals(Collections.emptyList(), model.findHashTags());
    4244        model.setComment(" #foo ");
    4345        assertEquals(Arrays.asList("#foo"), model.findHashTags());
    4446        model.setComment(" #foo #bar baz");
    4547        assertEquals(Arrays.asList("#foo", "#bar"), model.findHashTags());
     48        model.setComment(" #foo, #bar, baz");
     49        assertEquals(Arrays.asList("#foo", "#bar"), model.findHashTags());
     50        model.setComment(" #foo; #bar; baz");
     51        assertEquals(Arrays.asList("#foo", "#bar"), model.findHashTags());
     52        model.setComment("#hotosm-project-4773 #DRONEBIRD #OsakaQuake2018 #AOYAMAVISION");
     53        assertEquals(Arrays.asList("#hotosm-project-4773", "#DRONEBIRD", "#OsakaQuake2018", "#AOYAMAVISION"), model.findHashTags());
    4654    }
    4755}
Note: See TracChangeset for help on using the changeset viewer.