Add okv function to the TAP test library
[openafs.git] / tests / tap / basic.h
index 9ce4c7a..f8e5a58 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef TAP_BASIC_H
 #define TAP_BASIC_H 1
 
+#include <stdarg.h>             /* va_list */
 #include <sys/types.h>          /* pid_t */
 
 /*
@@ -72,9 +73,14 @@ void plan_lazy(void);
 void skip_all(const char *format, ...)
     __attribute__((__noreturn__, __format__(printf, 1, 2)));
 
-/* Basic reporting functions. */
+/*
+ * Basic reporting functions.  The okv() function is the same as ok() but
+ * takes the test description as a va_list to make it easier to reuse the
+ * reporting infrastructure when writing new tests.
+ */
 void ok(int success, const char *format, ...)
     __attribute__((__format__(printf, 2, 3)));
+void okv(int success, const char *format, va_list args);
 void skip(const char *reason, ...)
     __attribute__((__format__(printf, 1, 2)));