Ignore:
Timestamp:
2021-05-06T22:37:43+02:00 (3 years ago)
Author:
simon04
Message:

fix #20851, see #20842 - Tagging presets: value_template="..." for conditional template

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupportTest.java

    r17611 r17876  
    3737    void testTemplate() throws Exception {
    3838        ArrayList<Tag> tags = new ArrayList<>(Arrays.asList(
     39                new Tag("route", "bus"),
    3940                new Tag("name", "xxx"),
    4041                new Tag("from", "Foo"),
     
    4647        TemplateEntry templateEntry = new TemplateParser("Bus {ref}: {from} -> {to}").parse();
    4748        assertEquals("Bus 42: Foo -> Bar", templateEntry.getText(support));
     49        templateEntry = new TemplateParser("?{route=train 'Train'|route=bus 'Bus'|'X'} {ref}: {from} -> {to}").parse();
     50        assertEquals("Bus 42: Foo -> Bar", templateEntry.getText(support));
    4851    }
    4952}
Note: See TracChangeset for help on using the changeset viewer.