* Replace testutil output routines. We do this to eliminate possible sources
* of BIO error
*/
+BIO *bio_out = NULL;
+BIO *bio_err = NULL;
+
+static int tap_level = 0;
+
void test_open_streams(void)
{
}
+void test_adjust_streams_tap_level(int level)
+{
+ tap_level = level;
+}
+
void test_close_streams(void)
{
}
*/
int test_vprintf_stdout(const char *fmt, va_list ap)
{
- return vfprintf(stdout, fmt, ap);
+ return fprintf(stdout, "%*s# ", tap_level, "") + vfprintf(stdout, fmt, ap);
}
int test_vprintf_stderr(const char *fmt, va_list ap)
{
- return vfprintf(stderr, fmt, ap);
+ return fprintf(stderr, "%*s# ", tap_level, "") + vfprintf(stderr, fmt, ap);
}
int test_flush_stdout(void)
return fflush(stderr);
}
+int test_vprintf_tapout(const char *fmt, va_list ap)
+{
+ return fprintf(stdout, "%*s", tap_level, "") + vfprintf(stdout, fmt, ap);
+}
+
+int test_vprintf_taperr(const char *fmt, va_list ap)
+{
+ return fprintf(stderr, "%*s", tap_level, "") + vfprintf(stderr, fmt, ap);
+}
+
+int test_flush_tapout(void)
+{
+ return fflush(stdout);
+}
+
+int test_flush_taperr(void)
+{
+ return fflush(stderr);
+}
+