Ignore META DATA tags when comparing files.

This commit is contained in:
Diomidis Spinellis 2007-11-27 09:08:16 +00:00
parent c60483af35
commit 71f21d6b5c
1 changed files with 9 additions and 2 deletions

View File

@ -51,13 +51,20 @@ public class TestUtils {
refReader = new BufferedReader(new FileReader(refTextFile));
outReader = new BufferedReader(new FileReader(outTextFile));
// line by line scan, exit when one file ends or lines are not
// equal (and pass over the "Generated by javadoc ..." comments)
/*
* Line by line scan, exit when one file ends or lines are not
* equal.
* Ignore the "Generated by javadoc ..." comments, and the
* "<META NAME="date"" tags
*/
for (;;) {
refLine = refReader.readLine();
outFile = outReader.readLine();
if (refLine == null || outFile == null) {
break;
} else if (refLine.startsWith("<META NAME=\"date\"")) {
if (!outFile.startsWith("<META NAME=\"date\""))
break;
} else if (refLine.startsWith("<!-- Generated by javadoc ")) {
if (!outFile.startsWith("<!-- Generated by javadoc "))
break;