File linkfile = tmpdir.newFile();
Result r = duke("--showmatches --linkfile=\"" + linkfile.getAbsolutePath() +
"\" doc/example-data/countries.xml");
int outmatches = r.countOccurrences("MATCH 0.");
LinkDatabase db = LinkDatabaseUtils.loadTestFile(linkfile.getAbsolutePath());
assertEquals("disagreement on number of matches",
outmatches, db.getAllLinks().size());
}