Search in sources :

Example 6 with StringStyleFileLoader

use of func.lib.StringStyleFileLoader in project mkgmap by openstreetmap.

the class RuleFileReaderTest method testIncludeFileQuoted.

@Test
public void testIncludeFileQuoted() {
    StyleFileLoader loader = new StringStyleFileLoader(new String[][] { { "lines", "include \n 'inc file' \n;" }, { "inc file", "highway=secondary [0x3]" } });
    RuleSet rs = makeRuleSet(loader);
    Element el = new Way(1);
    el.addTag("highway", "secondary");
    GType type = getFirstType(rs, el);
    assertNotNull(type);
    assertEquals(3, type.getType());
}
Also used : TestUtils.makeRuleSet(func.lib.TestUtils.makeRuleSet) GType(uk.me.parabola.mkgmap.reader.osm.GType) StringStyleFileLoader(func.lib.StringStyleFileLoader) Element(uk.me.parabola.mkgmap.reader.osm.Element) StringStyleFileLoader(func.lib.StringStyleFileLoader) Way(uk.me.parabola.mkgmap.reader.osm.Way) Test(org.junit.Test)

Aggregations

StringStyleFileLoader (func.lib.StringStyleFileLoader)6 TestUtils.makeRuleSet (func.lib.TestUtils.makeRuleSet)6 Test (org.junit.Test)6 GType (uk.me.parabola.mkgmap.reader.osm.GType)5 Way (uk.me.parabola.mkgmap.reader.osm.Way)5 Element (uk.me.parabola.mkgmap.reader.osm.Element)4 FileNotFoundException (java.io.FileNotFoundException)1