import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
+import java.util.regex.Pattern;
public class FileComparator
while ((expected = expectedReader.readLine()) != null)
{
found = foundReader.readLine();
+ if (found == null)
+ {
+ System.err.println("Found less content than expected!");
+ System.err.println("First missing line: " + expected);
+ return false;
+ }
+
+ expected = expected.trim();
+ found = found.trim();
if (!expected.equals(found))
{
System.err.println("Mismatch!");