mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[tabs] update plane+cell unit tests #1233
This commit is contained in:
parent
78cc44a1bf
commit
3681a95b3c
@ -359,7 +359,7 @@ TEST_CASE("Cell") {
|
||||
nccell c = NCCELL_TRIVIAL_INITIALIZER;
|
||||
CHECK(-1 == nccell_load_char(n_, &c, '\f'));
|
||||
CHECK(-1 == nccell_load_char(n_, &c, '\v'));
|
||||
CHECK(-1 == nccell_load_char(n_, &c, '\t'));
|
||||
CHECK(1 == nccell_load_char(n_, &c, '\t'));
|
||||
CHECK(1 == nccell_load_char(n_, &c, '\n'));
|
||||
CHECK(1 == nccell_load_char(n_, &c, ' '));
|
||||
}
|
||||
|
@ -1031,14 +1031,17 @@ TEST_CASE("Plane") {
|
||||
ncplane_destroy(n1);
|
||||
}
|
||||
|
||||
// you ought not be able to output control characters
|
||||
// you ought not be able to output control characters, aside from tab, and
|
||||
// newlines (when we're scrolling).
|
||||
SUBCASE("DenyControlASCII") {
|
||||
signed char c = 0;
|
||||
c = -1;
|
||||
do{
|
||||
++c;
|
||||
if(c && !isprint(c)){
|
||||
CHECK(0 > ncplane_putchar_yx(n_, 0, 0, c));
|
||||
if(c != '\t'){
|
||||
CHECK(0 > ncplane_putchar_yx(n_, 0, 0, c));
|
||||
}
|
||||
}else{
|
||||
CHECK(1 == ncplane_putchar_yx(n_, 0, 0, c));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user