+void yaz_check_term1(void)
+{
+ /* summary */
+ if (test_failed)
+ {
+ if (test_verbose >= 1)
+ fprintf(get_file(), "%d out of %d tests failed for program %s\n",
+ test_failed, test_total, test_prog);
+ }
+ else
+ {
+ if (test_verbose >= 2)
+ fprintf(get_file(), "%d tests passed for program %s\n",
+ test_total, test_prog);
+ }
+ if (test_fout)
+ fclose(test_fout);
+ if (test_failed)
+ exit(1);
+ exit(0);
+}
+
+void yaz_check_eq1(int type, const char *file, int line,
+ const char *left, const char *right, int lval, int rval)
+{
+ char formstr[2048];
+
+ if (type==YAZ_TEST_TYPE_OK)
+ sprintf(formstr, "%.500s == %.500s ", left, right);
+ else
+ sprintf(formstr, "%.500s != %.500s\n %d != %d", left, right, lval,rval);
+ yaz_check_print1(type, file, line, formstr);
+}
+
+void yaz_check_print1(int type, const char *file, int line,
+ const char *expr)