2020-02-05 09:08:42 +00:00
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
TEST_CASE("DirectMode") {
|
2020-05-17 12:07:25 +00:00
|
|
|
struct ncdirect* nc_ = ncdirect_init(NULL, stderr);
|
|
|
|
if(!nc_){
|
2020-02-05 09:08:42 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("SetItalic") {
|
|
|
|
CHECK(0 == ncdirect_styles_set(nc_, NCSTYLE_ITALIC));
|
2020-05-17 12:07:25 +00:00
|
|
|
printf("DirectMode *italic*!\n");
|
|
|
|
fflush(stdout);
|
2020-02-05 09:08:42 +00:00
|
|
|
CHECK(0 == ncdirect_styles_off(nc_, NCSTYLE_ITALIC));
|
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("SetBold") {
|
|
|
|
CHECK(0 == ncdirect_styles_set(nc_, NCSTYLE_BOLD));
|
2020-05-17 12:07:25 +00:00
|
|
|
printf("DirectMode *bold*!\n");
|
|
|
|
fflush(stdout);
|
2020-02-05 09:08:42 +00:00
|
|
|
CHECK(0 == ncdirect_styles_off(nc_, NCSTYLE_BOLD));
|
|
|
|
}
|
|
|
|
|
|
|
|
SUBCASE("SetUnderline") {
|
|
|
|
CHECK(0 == ncdirect_styles_set(nc_, NCSTYLE_UNDERLINE));
|
2020-05-17 12:07:25 +00:00
|
|
|
printf("DirectMode *underline*!\n");
|
|
|
|
fflush(stdout);
|
2020-02-05 09:08:42 +00:00
|
|
|
CHECK(0 == ncdirect_styles_off(nc_, NCSTYLE_UNDERLINE));
|
|
|
|
}
|
|
|
|
|
|
|
|
CHECK(0 == ncdirect_stop(nc_));
|
|
|
|
}
|