2019-12-23 07:47:34 +00:00
|
|
|
#include "main.h"
|
|
|
|
|
2019-12-27 22:20:20 +00:00
|
|
|
TEST_CASE("NotcursesInput") {
|
|
|
|
if(getenv("TERM") == nullptr){
|
|
|
|
return;
|
2019-12-23 07:47:34 +00:00
|
|
|
}
|
2019-12-27 22:20:20 +00:00
|
|
|
notcurses_options nopts{};
|
|
|
|
nopts.inhibit_alternate_screen = true;
|
2019-12-28 23:37:44 +00:00
|
|
|
nopts.suppress_banner = true;
|
2019-12-27 22:20:20 +00:00
|
|
|
FILE* outfp_ = fopen("/dev/tty", "wb");
|
|
|
|
REQUIRE(outfp_);
|
|
|
|
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);
|
|
|
|
REQUIRE(nc_);
|
2019-12-23 07:47:34 +00:00
|
|
|
|
2019-12-27 22:20:20 +00:00
|
|
|
REQUIRE(0 == notcurses_mouse_enable(nc_));
|
|
|
|
CHECK(0 == notcurses_mouse_disable(nc_));
|
2019-12-23 07:47:34 +00:00
|
|
|
|
2019-12-27 22:20:20 +00:00
|
|
|
CHECK(0 == notcurses_stop(nc_));
|
|
|
|
CHECK(0 == fclose(outfp_));
|
2019-12-23 07:47:34 +00:00
|
|
|
}
|