|
|
|
@ -111,8 +111,23 @@ TEST_CASE("Scrolling") {
|
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FIXME add one verifying boxes don't exceed the right side
|
|
|
|
|
// FIXME add one where we go past the end of the plane
|
|
|
|
|
// ensure that if we draw a box on a scrolling plane, it stops at the right
|
|
|
|
|
// side, as opposed to scrolling and making a horrible mess
|
|
|
|
|
SUBCASE("ScrollingBoxen") {
|
|
|
|
|
struct ncplane* n = ncplane_new(nc_, 4, 20, 1, 1, nullptr);
|
|
|
|
|
REQUIRE(n);
|
|
|
|
|
// verify that the new plane was started without scrolling
|
|
|
|
|
CHECK(!ncplane_set_scrolling(n, true));
|
|
|
|
|
cell ul = CELL_TRIVIAL_INITIALIZER, ur = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
|
cell dl = CELL_TRIVIAL_INITIALIZER, dr = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
|
cell hl = CELL_TRIVIAL_INITIALIZER, vl = CELL_TRIVIAL_INITIALIZER;
|
|
|
|
|
CHECK(0 == cells_double_box(n, 0, 0, &ul, &ur, &dl, &dr, &hl, &vl));
|
|
|
|
|
CHECK(0 > ncplane_box_sized(n, &ul, &ur, &dl, &dr, &hl, &vl, 2, 25, 0));
|
|
|
|
|
CHECK(0 > ncplane_box_sized(n, &ul, &ur, &dl, &dr, &hl, &vl, 2, 21, 0));
|
|
|
|
|
CHECK(0 == notcurses_render(nc_));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FIXME add one where we go past the end of the plane and force a new line
|
|
|
|
|
|
|
|
|
|
CHECK(0 == notcurses_stop(nc_));
|
|
|
|
|
CHECK(0 == fclose(outfp_));
|
|
|
|
|