#include "testlib.h"

#include <string>

using namespace std;

int main( int argc, char *argv[] )
{
  setName("Standard checker: compare sequences of lines (delimited by line breaks)");
  registerTestlibCmd(argc, argv);
  int cur = 0;
  while (!ans.seekEof() && !ouf.seekEof())
  {
    cur++;
    string ja = ans.readLine();
    string pa = ouf.readLine();
    if (ja != pa)
      quitf(_wa, "Line %d: ``%s'' expected, ``%s'' found",
        cur, ja.c_str(), pa.c_str());
  }
  if (!ans.seekEof())
    quitf(_wa, "End of file unexpected");
  if (!ouf.seekEof())
    quitf(_wa, "End of file expected");
  quitf(_ok, "%d lines", cur);
  return -1;
}
