mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
update LayoutZooText unit test
This commit is contained in:
parent
ef480b81d1
commit
0740f0286f
@ -570,20 +570,12 @@ TEST_CASE("TextLayout") {
|
|||||||
"NCFdplane streams a file descriptor, while NCSubproc spawns a subprocess and streams its output. "
|
"NCFdplane streams a file descriptor, while NCSubproc spawns a subprocess and streams its output. "
|
||||||
"A variety of plots are supported, and menus can be placed along the top and/or bottom of any plane.\n\n"
|
"A variety of plots are supported, and menus can be placed along the top and/or bottom of any plane.\n\n"
|
||||||
"Widgets can be controlled with the keyboard and/or mouse. They are implemented atop ncplanes, and these planes can be manipulated like all others.";
|
"Widgets can be controlled with the keyboard and/or mouse. They are implemented atop ncplanes, and these planes can be manipulated like all others.";
|
||||||
struct ncplane_options nopts = {
|
struct ncplane_options nopts{};
|
||||||
.y = 0,
|
nopts.rows = READER_ROWS;
|
||||||
.x = 0,
|
nopts.cols = READER_COLS;
|
||||||
.rows = READER_ROWS,
|
nopts.flags = NCPLANE_OPTION_VSCROLL;
|
||||||
.cols = READER_COLS,
|
|
||||||
.userptr = nullptr,
|
|
||||||
.name = nullptr,
|
|
||||||
.resizecb = nullptr,
|
|
||||||
.flags = 0,
|
|
||||||
.margin_b = 0, .margin_r = 0,
|
|
||||||
};
|
|
||||||
auto sp = ncplane_create(n_, &nopts);
|
auto sp = ncplane_create(n_, &nopts);
|
||||||
REQUIRE(sp);
|
REQUIRE(sp);
|
||||||
ncplane_set_scrolling(sp, true);
|
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
ncplane_home(sp);
|
ncplane_home(sp);
|
||||||
CHECK(0 < ncplane_puttext(sp, 0, NCALIGN_LEFT, text, &bytes));
|
CHECK(0 < ncplane_puttext(sp, 0, NCALIGN_LEFT, text, &bytes));
|
||||||
@ -591,7 +583,7 @@ TEST_CASE("TextLayout") {
|
|||||||
CHECK(0 == notcurses_render(nc_));
|
CHECK(0 == notcurses_render(nc_));
|
||||||
char* line = ncplane_contents(sp, 0, 0, 0, 0);
|
char* line = ncplane_contents(sp, 0, 0, 0, 0);
|
||||||
REQUIRE(line);
|
REQUIRE(line);
|
||||||
CHECK(0 == strcmp(line, "to be selected from a list of n items. NCFdplane streams a file descriptor, while NCSubproc spawns a subprocess and streams its output. A variety of plots are supported, and menus can be placed along the top and/or bottom of any plane.Widgets can be controlled with the keyboard and/or mouse. They are implemented atop ncplanes, and these planes can be manipulated like all others."));
|
CHECK(0 == strcmp(line, "descriptor, while NCSubproc spawns a subprocess and streams its output. A variety of plots are supported, and menus can be placed along the top and/or bottom of any plane.\nWidgets can be controlled with the keyboard and/or mouse. They are implemented atop ncplanes, and these planes can be manipulated like all others."));
|
||||||
free(line);
|
free(line);
|
||||||
CHECK(0 == ncplane_destroy(sp));
|
CHECK(0 == ncplane_destroy(sp));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user