}
for (InputSource is : originalSrcs.keySet()) { mc.addInputSource(is); }
StringBuilder actual = new StringBuilder();
RenderContext rc = new RenderContext(new Concatenator(actual));
TokenConsumer r = createRenderer(originalSrcs, mc, rc);
for (String line
: TestUtil.readResource(getClass(), rewrittenFile).split("\n")) {
if (line.startsWith("#")) {
line = line.substring(1).trim();
if ("<null>".equals(line)) {
r.mark(null);
} else {
r.mark(toFilePosition(line, originalSrcs));
}
} else {
r.consume(line);
}
}
r.noMoreTokens();
assertEquals(
TestUtil.readResource(getClass(), goldenFile).replace("@", "\uFFFD"),
actual.toString());
}