From 3b252c20b19f093e87363de197f1100b79705dd3 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Thu, 8 Feb 2018 08:46:20 +0000 Subject: upstream: some helpers to check verbose/quiet mode OpenBSD-Regress-ID: e736aac39e563f5360a0935080a71d5fdcb976de --- regress/unittests/test_helper/test_helper.c | 14 +++++++++++++- regress/unittests/test_helper/test_helper.h | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'regress') diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c index f855137fb..866f3495d 100644 --- a/regress/unittests/test_helper/test_helper.c +++ b/regress/unittests/test_helper/test_helper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_helper.c,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */ +/* $OpenBSD: test_helper.c,v 1.8 2018/02/08 08:46:20 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -166,6 +166,18 @@ main(int argc, char **argv) return 0; } +int +test_is_verbose() +{ + return verbose_mode; +} + +int +test_is_quiet() +{ + return quiet_mode; +} + const char * test_data_file(const char *name) { diff --git a/regress/unittests/test_helper/test_helper.h b/regress/unittests/test_helper/test_helper.h index 615b7832b..6da0066e9 100644 --- a/regress/unittests/test_helper/test_helper.h +++ b/regress/unittests/test_helper/test_helper.h @@ -1,4 +1,4 @@ -/* $OpenBSD: test_helper.h,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */ +/* $OpenBSD: test_helper.h,v 1.8 2018/02/08 08:46:20 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -43,6 +43,8 @@ void test_start(const char *n); void test_info(char *s, size_t len); void set_onerror_func(test_onerror_func_t *f, void *ctx); void test_done(void); +int test_is_verbose(void); +int test_is_quiet(void); void test_subtest_info(const char *fmt, ...) __attribute__((format(printf, 1, 2))); void ssl_err_check(const char *file, int line); -- cgit v1.2.3