}
return ind;
}
public void testTextSource() {
TextSource source = new TextSource("file", "aa\nbb\n\nc".toCharArray(), 7);
int[] expected = new int[] { 7, 7, 7, 8, 8, 8, 9, 10 };
for (int i = 0; i < expected.length; i++) {
Assert.assertEquals("offset #" + i, expected[i], source.lineForOffset(i));
}
}