From a46dcc5fe475114ddbab0d0f2c1741d2ea275e8e Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 15 Jun 2020 23:52:11 -0400 Subject: [PATCH] tester: introduce testing_notcurses() #718 --- tests/main.cpp | 7 +++++++ tests/main.h | 1 + 2 files changed, 8 insertions(+) diff --git a/tests/main.cpp b/tests/main.cpp index 98fa47d65..08e2dd0b5 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -13,6 +13,13 @@ static const char* datadir = NOTCURSES_SHARE; +auto testing_notcurses() -> struct notcurses* { + notcurses_options nopts{}; + nopts.loglevel = NCLOGLEVEL_DEBUG; + auto nc = notcurses_init(&nopts, nullptr); + return nc; +} + auto find_data(const char* datum) -> char* { std::filesystem::path p = datadir; p /= datum; diff --git a/tests/main.h b/tests/main.h index da6606601..020424a1d 100644 --- a/tests/main.h +++ b/tests/main.h @@ -11,6 +11,7 @@ auto find_data(const char* datum) -> char*; auto enforce_utf8() -> bool; +auto testing_notcurses() -> struct notcurses*; class TestOptions : public notcurses_options { public: