diff options
Diffstat (limited to 'unittest/mytap/tap.c')
-rw-r--r-- | unittest/mytap/tap.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c index 4e053e3e745..a5831f2b71d 100644 --- a/unittest/mytap/tap.c +++ b/unittest/mytap/tap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 MySQL AB +/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ @ingroup MyTAP_Internal */ -static TEST_DATA g_test = { 0, 0, 0, "" }; +static TEST_DATA g_test = { NO_PLAN, 0, 0, "" }; /** Output stream for test report message. @@ -74,6 +74,7 @@ vemit_tap(int pass, char const *fmt, va_list ap) (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); + fflush(tapout); } @@ -96,6 +97,7 @@ static void emit_dir(const char *dir, const char *why) { fprintf(tapout, " # %s %s", dir, why); + fflush(tapout); } @@ -108,6 +110,7 @@ static void emit_endl() { fprintf(tapout, "\n"); + fflush(tapout); } static void @@ -183,7 +186,10 @@ plan(int const count) break; default: if (count > 0) + { fprintf(tapout, "1..%d\n", count); + fflush(tapout); + } break; } } @@ -196,6 +202,7 @@ skip_all(char const *reason, ...) va_start(ap, reason); fprintf(tapout, "1..0 # skip "); vfprintf(tapout, reason, ap); + fflush(tapout); va_end(ap); exit(0); } @@ -218,7 +225,7 @@ ok(int const pass, char const *fmt, ...) void -skip(int how_many, char const *const fmt, ...) +skip(int how_many, char const *fmt, ...) { char reason[80]; if (fmt && *fmt) |