commit - d9d021614d5ee3cc0faf6a9439b01a7c1b92756d
commit + e334da07191a9e882f08c5a6a5035a96b5b1f946
blob - a0bdeabff52b999ef8f84971713303b65cd1bf56
blob + dde60d9088befcef116db907d14154bf073e0afe
--- script.c
+++ script.c
for (i = 1; i < argc; ++i)
loadfile(argv[i]);
+ i = 0;
TAILQ_FOREACH(t, &tests, entry) {
- switch (run_test(t)) {
- case TEST_PASSED: passed++; break;
- case TEST_FAILED: failed++; break;
- case TEST_SKIPPED: skipped++; break;
+ printf("===> running test \"%s\"... ", t->name);
+ fflush(stdout);
+
+ switch (run_test(t)) {
+ case TEST_PASSED:
+ printf("ok!\n");
+ passed++;
+ break;
+ case TEST_FAILED:
+ failed++;
+ /* we've already printed the failure */
+ printf("\n");
+ break;
+ case TEST_SKIPPED:
+ printf("skipped!\n");
+ skipped++;
+ break;
}
+
+ i++;
}
- printf("passed = %d\n", passed);
- printf("failed = %d\n", failed);
- printf("skipped = %d\n", skipped);
+ printf("passed %d/%d\n", passed, i);
+ printf("failed %d\n", failed);
+ printf("skipped %d\n", skipped);
return failed != 0;
}