39 static void tap_vprintf(
const char *format, va_list ap);
42 tap_plan_impl(
int n,
const char *format, ...)
51 _setmode(1, _O_BINARY);
57 if (format && *format) {
61 tap_vprintf(format, ap);
76 tap_test_impl(
int test,
const char *expr,
const char *
file,
int line,
77 const char *format, ...)
83 printf(test ?
"ok %d" :
"not ok %d", ++tap_num);
88 tap_vprintf(format, ap);
94 printf(
"# %s:%d: Test `%s' failed.\n", file, line, expr);
100 tap_diag_impl(
const char *format, ...)
105 va_start(ap, format);
106 tap_vprintf(format, ap);
112 tap_abort_impl(
const char *format, ...)
120 va_start(ap, format);
121 tap_vprintf(format, ap);
130 tap_vprintf(
const char *format, va_list ap)
139 for (
char *cp = s; cp < s + n; cp++) {
142 if (cp + 1 < s + n && cp[1] ==
'\n')
150 default: fputc(*cp, stdout);
int vasprintf(char **strp, const char *fmt, va_list ap)
Equivalent to vsprintf(), except that it allocates a string large enough to hold the output...
This is the public header file of the Test Anything Protocol (TAP) library.
This header file is part of the C11 and POSIX compatibility library; it includes <stdio.h> and defines any missing functionality.
This header file is part of the C11 and POSIX compatibility library; it includes <stdlib.h> and defines any missing functionality.
#define _Noreturn
A function declared with a _Noreturn function specifier SHALL not return to its caller.