mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
add unit test for putchar on tab #1233
This commit is contained in:
parent
28756a004f
commit
6bf37089a1
22
src/tests/tabs.cpp
Normal file
22
src/tests/tabs.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include <cstdlib>
|
||||
#include "main.h"
|
||||
|
||||
TEST_CASE("TaBs") { // refreshing and delicious
|
||||
auto nc_ = testing_notcurses();
|
||||
if(!nc_){
|
||||
return;
|
||||
}
|
||||
struct ncplane* n_ = notcurses_stdplane(nc_);
|
||||
REQUIRE(n_);
|
||||
|
||||
SUBCASE("PutcTaB") {
|
||||
unsigned y, x;
|
||||
CHECK(1 == ncplane_putchar(n_, '\n'));
|
||||
ncplane_cursor_yx(n_, &y, &x);
|
||||
CHECK(y == 8);
|
||||
CHECK(x == 0);
|
||||
}
|
||||
|
||||
CHECK(0 == notcurses_stop(nc_));
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user