-/^PASS.*dox.*(test for excess errors)/ { next }
-/^PASS/ { if (match ($0, "exp-P")) { pass++; next } }
-/^FAIL/ { if (match ($0, "exp-F")) { pass++; next } }
-/^XPASS/ { if (match ($0, "exp-XP")) { pass++; next } }
-/^XFAIL/ { if (match ($0, "exp-XF")) { pass++; next } }
-/^UNSUPPORTED/ { if (match ($0, "exp-U")) { pass++; next } }
- { print }
-END { printf("%d tests passed\n", pass) }
+/^PASS.*dox.*(test for excess errors)/ { ignore(); next }
+# Ignore lines that begin with comma.
+/^,/ { ignore(); next }
+/^PASS/ { if (match ($0, "exp-P")) { pass(); next } }
+/^FAIL/ { if (match ($0, "exp-F")) { pass(); next } }
+/^XPASS/ { if (match ($0, "exp-XP")) { pass(); next } }
+/^XFAIL/ { if (match ($0, "exp-XF")) { pass(); next } }
+/^UNSUPPORTED/ { if (match ($0, "exp-U")) { pass(); next } }
+ { fail() }
+END {
+ printf("\n\t\t=== Test Framework Summary ===\n\n");
+ printf("# of expected passes\t\t%d\n", passes);
+ if (fails != 0)
+ printf("# of unexpected failures\t%d\n", fails);
+ }