tester: introduce testing_notcurses() #718

This commit is contained in:
nick black 2020-06-15 23:52:11 -04:00
parent 3f114f4305
commit a46dcc5fe4
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,13 @@
static const char* datadir = NOTCURSES_SHARE; 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* { auto find_data(const char* datum) -> char* {
std::filesystem::path p = datadir; std::filesystem::path p = datadir;
p /= datum; p /= datum;

View File

@ -11,6 +11,7 @@
auto find_data(const char* datum) -> char*; auto find_data(const char* datum) -> char*;
auto enforce_utf8() -> bool; auto enforce_utf8() -> bool;
auto testing_notcurses() -> struct notcurses*;
class TestOptions : public notcurses_options { class TestOptions : public notcurses_options {
public: public: