use of func.lib.Outputs in project mkgmap by openstreetmap.
the class ArgsTest method testDisplayPriority.
@Test
public void testDisplayPriority() throws FileNotFoundException {
TestUtils.registerFile("osmmap.img");
int pri = 42;
Outputs op = TestUtils.run("--draw-priority=" + pri, Args.TEST_RESOURCE_OSM + "uk-test-1.osm.gz");
op.checkNoError();
FileSystem fs = openFs(Args.DEF_MAP_FILENAME);
ImgChannel chan = fs.open(Args.DEF_MAP_ID + ".TRE", "r");
TREFileReader treFile = new TREFileReader(chan);
assertEquals("display priority", pri, ((TREHeader) treFile.getHeader()).getDisplayPriority());
}
use of func.lib.Outputs in project mkgmap by openstreetmap.
the class ArgsTest method testHelpOptions.
@Test
public void testHelpOptions() {
Outputs outputs = TestUtils.run("--help=options");
outputs.checkNoError();
outputs.checkOutput("--mapname=name", "--latin1", "--list-styles");
checkNoStdFile();
}
use of func.lib.Outputs in project mkgmap by openstreetmap.
the class ArgsTest method testListStylesVerbose.
@Test
public void testListStylesVerbose() {
Outputs op = TestUtils.run("--style-file=test/resources/teststyles", "--verbose", "--list-styles");
op.checkNoError();
op.checkOutput("empty", "main", "simple", "derived", "2.2: A simple test style", "Used for many functional tests");
checkNoStdFile();
}
use of func.lib.Outputs in project mkgmap by openstreetmap.
the class IndexTest method testCreateIndex.
@Test
public void testCreateIndex() throws IOException {
File f = new File(MDR_IMG);
f.delete();
assertFalse("does not pre-exist", f.exists());
Outputs outputs = TestUtils.run(Args.TEST_STYLE_ARG, "--index", "--latin1", "--family-id=1002", "--overview-mapname=" + OVERVIEW_NAME, Args.TEST_RESOURCE_IMG + "63240001.img", Args.TEST_RESOURCE_IMG + "63240002.img");
outputs.checkNoError();
TestUtils.registerFile(MDR_IMG);
TestUtils.registerFile(OVERVIEW_NAME + ".tdb");
TestUtils.registerFile(OVERVIEW_NAME + ".mdx");
TestUtils.registerFile(OVERVIEW_NAME + ".img");
assertTrue(MDR_IMG + " is created", f.exists());
FileSystem fs = openFs(MDR_IMG);
DirectoryEntry entry = fs.lookup(OVERVIEW_NAME.toUpperCase() + ".MDR");
assertNotNull("Contains the MDR file", entry);
entry = fs.lookup(OVERVIEW_NAME.toUpperCase() + ".SRT");
assertNotNull("contains the SRT file", entry);
fs.close();
}
Aggregations