Changeset 8482 in josm for trunk/test/unit


Ignore:
Timestamp:
2015-06-10T21:00:48+02:00 (9 years ago)
Author:
simon04
Message:

Correctly parse tab-separated tags

… by using non-greedy regular expression for prefix to ignore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java

    r7937 r8482  
    9595
    9696    }
     97
     98    @Test
     99    public void testTab() throws Exception {
     100        Assert.assertEquals(TextTagParser.readTagsFromText("shop\tjewelry"), Collections.singletonMap("shop", "jewelry"));
     101        Assert.assertEquals(TextTagParser.readTagsFromText("!shop\tjewelry"), Collections.singletonMap("shop", "jewelry"));
     102        Assert.assertEquals(TextTagParser.readTagsFromText("!!!shop\tjewelry"), Collections.singletonMap("shop", "jewelry"));
     103        Assert.assertEquals(TextTagParser.readTagsFromText("shop\t\t\tjewelry"), Collections.singletonMap("shop", "jewelry"));
     104    }
    97105}
Note: See TracChangeset for help on using the changeset viewer.