Пример #1
0
int main (int argc, char ** argv)
{
	printf ("FILECHECK	   TESTS\n");
	printf ("==================\n\n");

	init (argc, argv);
	testBom ("filecheck/BOMFILE", 0, 1);
	testBom ("filecheck/BOMFILE", 1, (-1));
	testBom ("filecheck/NOBOMFILE", 0, 1);
	testBom ("filecheck/NOBOMFILE", 1, 1);
	testNull ("filecheck/NULLBYTE", 0, 1);
	testNull ("filecheck/NULLBYTE", 1, (-1));
	testNull ("filecheck/NONULLBYTE", 0, 1);
	testNull ("filecheck/NONULLBYTE", 1, 1);
	testLEConsistency ("filecheck/inconsistent", 0, 1);
	testLEConsistency ("filecheck/inconsistent", 1, (-1));
	testLEcrlf ("filecheck/valid1", 1, 1);
	testLEcrlf ("filecheck/invalid", 1, (-1));

	testEncoding ("filecheck/utf.txt", 1, 1);
	testEncoding ("filecheck/iso.txt", 1, (-1));

	printf ("\ntestmod_filecheck RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);

	return nbError;
}
Пример #2
0
int main(void)
{
  int res=0;
  res += testSerial();
  res += testParallel();
  res += testNull();

  printf("=============================\nResistance test was: ");
  if (res == 0) {
    printf("SUCCESS\n");
  } else {
    printf("FAILED\n");
  }
  return res; 
}