|
|
@ -124,13 +124,13 @@ TEST_CASE("Wide") {
|
|
|
|
ncplane_at_yx_cell(n_, 0, 0, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 0, &c);
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), FROG));
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), FROG));
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
CHECK(ncstrwidth(FROG) == 1 + nccell_double_wide_p(&c)); // should be wide
|
|
|
|
CHECK(ncstrwidth(FROG, NULL, NULL) == 1 + nccell_double_wide_p(&c)); // should be wide
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
CHECK(0 == strlen(nccell_extended_gcluster(n_, &c))); // should be nothing
|
|
|
|
CHECK(0 == strlen(nccell_extended_gcluster(n_, &c))); // should be nothing
|
|
|
|
ncplane_at_yx_cell(n_, 1, 0, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 1, 0, &c);
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), FROG));
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), FROG));
|
|
|
|
ncplane_at_yx_cell(n_, 1, 1, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 1, 1, &c);
|
|
|
|
CHECK(ncstrwidth(FROG) == 1 + nccell_double_wide_p(&c)); //should be wide
|
|
|
|
CHECK(ncstrwidth(FROG, NULL, NULL) == 1 + nccell_double_wide_p(&c)); //should be wide
|
|
|
|
CHECK(0 == notcurses_render(nc_)); // should be nothing
|
|
|
|
CHECK(0 == notcurses_render(nc_)); // should be nothing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -155,7 +155,7 @@ TEST_CASE("Wide") {
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), SNAKE));
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), SNAKE));
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
CHECK(ncstrwidth(SNAKE) == 1 + nccell_double_wide_p(&c)); // should be wide
|
|
|
|
CHECK(ncstrwidth(SNAKE, NULL, NULL) == 1 + nccell_double_wide_p(&c)); // should be wide
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -175,7 +175,7 @@ TEST_CASE("Wide") {
|
|
|
|
CHECK(3 == x);
|
|
|
|
CHECK(3 == x);
|
|
|
|
nccell c = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
nccell c = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
ncplane_at_yx_cell(n_, 0, 0, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 0, &c);
|
|
|
|
if(ncstrwidth(wbashedl) > 1){
|
|
|
|
if(ncstrwidth(wbashedl, NULL, NULL) > 1){
|
|
|
|
CHECK(0 == c.gcluster); // should be nothing
|
|
|
|
CHECK(0 == c.gcluster); // should be nothing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
@ -183,7 +183,7 @@ TEST_CASE("Wide") {
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
CHECK(0 == strcmp(cc, nccell_extended_gcluster(n_, &c))); // should be 'X'
|
|
|
|
CHECK(0 == strcmp(cc, nccell_extended_gcluster(n_, &c))); // should be 'X'
|
|
|
|
ncplane_at_yx_cell(n_, 0, 3, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 3, &c);
|
|
|
|
if(ncstrwidth(wbashedr) > 1){
|
|
|
|
if(ncstrwidth(wbashedr, NULL, NULL) > 1){
|
|
|
|
CHECK(0 == strlen(nccell_extended_gcluster(n_, &c))); // should be nothing
|
|
|
|
CHECK(0 == strlen(nccell_extended_gcluster(n_, &c))); // should be nothing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
@ -206,13 +206,13 @@ TEST_CASE("Wide") {
|
|
|
|
ncplane_at_yx_cell(n_, 0, 0, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 0, &c);
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), SNAKE));
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), SNAKE));
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 1, &c);
|
|
|
|
CHECK(ncstrwidth(SNAKE) == 1 + nccell_double_wide_p(&c));
|
|
|
|
CHECK(ncstrwidth(SNAKE, NULL, NULL) == 1 + nccell_double_wide_p(&c));
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 2, &c);
|
|
|
|
CHECK(0 == strcmp(cc, nccell_extended_gcluster(n_, &c))); // should be 'X'
|
|
|
|
CHECK(0 == strcmp(cc, nccell_extended_gcluster(n_, &c))); // should be 'X'
|
|
|
|
ncplane_at_yx_cell(n_, 0, 3, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 3, &c);
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), SCORPION));
|
|
|
|
CHECK(0 == strcmp(nccell_extended_gcluster(n_, &c), SCORPION));
|
|
|
|
ncplane_at_yx_cell(n_, 0, 4, &c);
|
|
|
|
ncplane_at_yx_cell(n_, 0, 4, &c);
|
|
|
|
CHECK(ncstrwidth(SCORPION) == 1 + nccell_double_wide_p(&c));
|
|
|
|
CHECK(ncstrwidth(SCORPION, NULL, NULL) == 1 + nccell_double_wide_p(&c));
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -233,7 +233,7 @@ TEST_CASE("Wide") {
|
|
|
|
unsigned dimx, dimy;
|
|
|
|
unsigned dimx, dimy;
|
|
|
|
ncplane_dim_yx(n_, &dimy, &dimx);
|
|
|
|
ncplane_dim_yx(n_, &dimy, &dimx);
|
|
|
|
CHECK(0 == ncplane_rounded_box_sized(ncp, 0, 0, 3, 4, 0));
|
|
|
|
CHECK(0 == ncplane_rounded_box_sized(ncp, 0, 0, 3, 4, 0));
|
|
|
|
CHECK(ncstrwidth(SCORPION) == ncplane_putegc_yx(ncp, 1, 1, SCORPION, nullptr));
|
|
|
|
CHECK(ncstrwidth(SCORPION, NULL, NULL) == ncplane_putegc_yx(ncp, 1, 1, SCORPION, nullptr));
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
nccell c = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
nccell c = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
CHECK(0 < ncplane_at_yx_cell(ncp, 1, 0, &c));
|
|
|
|
CHECK(0 < ncplane_at_yx_cell(ncp, 1, 0, &c));
|
|
|
|