projects
/
hibernate4-maven-plugin
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Configured the 5.1.17-tutorials as integration-tests for the plugin
[hibernate4-maven-plugin]
/
src
/
test
/
java
/
de
/
juplo
/
test
/
FileComparator.java
diff --git
a/src/test/java/de/juplo/test/FileComparator.java
b/src/test/java/de/juplo/test/FileComparator.java
index
beb2564
..
9229fc8
100644
(file)
--- a/
src/test/java/de/juplo/test/FileComparator.java
+++ b/
src/test/java/de/juplo/test/FileComparator.java
@@
-5,6
+5,7
@@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
+import java.util.regex.Pattern;
public class FileComparator
public class FileComparator
@@
-36,6
+37,15
@@
public class FileComparator
while ((expected = expectedReader.readLine()) != null)
{
found = foundReader.readLine();
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!");
if (!expected.equals(found))
{
System.err.println("Mismatch!");