Lines Matching refs:tty_out

96 static void get_screen_info(uv_tty_t* tty_out, struct screen_info* si) {  in get_screen_info()  argument
97 ASSERT(GetConsoleScreenBufferInfo(tty_out->handle, &(si->csbi))); in get_screen_info()
105 static void set_cursor_position(uv_tty_t* tty_out, COORD pos) { in set_cursor_position() argument
106 HANDLE handle = tty_out->handle; in set_cursor_position()
114 static void get_cursor_position(uv_tty_t* tty_out, COORD* cursor_position) { in get_cursor_position() argument
115 HANDLE handle = tty_out->handle; in get_cursor_position()
122 static void set_cursor_to_home(uv_tty_t* tty_out) { in set_cursor_to_home() argument
124 set_cursor_position(tty_out, origin); in set_cursor_to_home()
127 static CONSOLE_CURSOR_INFO get_cursor_info(uv_tty_t* tty_out) { in get_cursor_info() argument
128 HANDLE handle = tty_out->handle; in get_cursor_info()
134 static void set_cursor_size(uv_tty_t* tty_out, DWORD size) { in set_cursor_size() argument
135 CONSOLE_CURSOR_INFO info = get_cursor_info(tty_out); in set_cursor_size()
137 ASSERT(SetConsoleCursorInfo(tty_out->handle, &info)); in set_cursor_size()
140 static DWORD get_cursor_size(uv_tty_t* tty_out) { in get_cursor_size() argument
141 return get_cursor_info(tty_out).dwSize; in get_cursor_size()
144 static void set_cursor_visibility(uv_tty_t* tty_out, BOOL visible) { in set_cursor_visibility() argument
145 CONSOLE_CURSOR_INFO info = get_cursor_info(tty_out); in set_cursor_visibility()
147 ASSERT(SetConsoleCursorInfo(tty_out->handle, &info)); in set_cursor_visibility()
150 static BOOL get_cursor_visibility(uv_tty_t* tty_out) { in get_cursor_visibility() argument
151 return get_cursor_info(tty_out).bVisible; in get_cursor_visibility()
154 static BOOL is_scrolling(uv_tty_t* tty_out, struct screen_info si) { in is_scrolling() argument
156 ASSERT(GetConsoleScreenBufferInfo(tty_out->handle, &info)); in is_scrolling()
160 static void write_console(uv_tty_t* tty_out, char* src) { in write_console() argument
167 r = uv_try_write((uv_stream_t*) tty_out, &buf, 1); in write_console()
172 static void setup_screen(uv_tty_t* tty_out) { in setup_screen() argument
176 ASSERT(GetConsoleScreenBufferInfo(tty_out->handle, &info)); in setup_screen()
181 tty_out->handle, '.', length, origin, &number_of_written)); in setup_screen()
185 static void clear_screen(uv_tty_t* tty_out, struct screen_info* si) { in clear_screen() argument
189 ASSERT(GetConsoleScreenBufferInfo(tty_out->handle, &info)); in clear_screen()
194 tty_out->handle, ' ', length, origin, &number_of_written); in clear_screen()
197 tty_out->handle, si->default_attr, length, origin, &number_of_written); in clear_screen()
208 static void capture_screen(uv_tty_t* tty_out, struct captured_screen* cs) { in capture_screen() argument
211 get_screen_info(tty_out, &(cs->si)); in capture_screen()
219 tty_out->handle, cs->text, cs->si.length, origin, &length)); in capture_screen()
222 tty_out->handle, cs->attributes, cs->si.length, origin, &length)); in capture_screen()
300 static BOOL compare_screen(uv_tty_t* tty_out, in compare_screen() argument
344 clear_screen(tty_out, &expect->si); in compare_screen()
350 static void initialize_tty(uv_tty_t* tty_out) { in initialize_tty() argument
368 r = uv_tty_init(uv_default_loop(), tty_out, ttyout_fd, 0); /* Writable. */ in initialize_tty()
372 static void terminate_tty(uv_tty_t* tty_out) { in terminate_tty() argument
373 set_cursor_to_home(tty_out); in terminate_tty()
374 uv_close((uv_handle_t*) tty_out, NULL); in terminate_tty()
378 uv_tty_t tty_out; in TEST_IMPL() local
386 initialize_tty(&tty_out); in TEST_IMPL()
387 get_screen_info(&tty_out, &si); in TEST_IMPL()
391 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
395 write_console(&tty_out, buffer); in TEST_IMPL()
396 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
403 write_console(&tty_out, buffer); in TEST_IMPL()
404 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
411 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
413 write_console(&tty_out, buffer); in TEST_IMPL()
414 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
417 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
419 terminate_tty(&tty_out); in TEST_IMPL()
429 uv_tty_t tty_out; in TEST_IMPL() local
437 initialize_tty(&tty_out); in TEST_IMPL()
438 get_screen_info(&tty_out, &si); in TEST_IMPL()
442 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
446 write_console(&tty_out, buffer); in TEST_IMPL()
447 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
454 write_console(&tty_out, buffer); in TEST_IMPL()
455 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
462 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
464 write_console(&tty_out, buffer); in TEST_IMPL()
465 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
468 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
470 terminate_tty(&tty_out); in TEST_IMPL()
480 uv_tty_t tty_out; in TEST_IMPL() local
488 initialize_tty(&tty_out); in TEST_IMPL()
489 get_screen_info(&tty_out, &si); in TEST_IMPL()
493 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
497 write_console(&tty_out, buffer); in TEST_IMPL()
498 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
505 write_console(&tty_out, buffer); in TEST_IMPL()
506 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
513 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
515 write_console(&tty_out, buffer); in TEST_IMPL()
516 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
523 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
525 write_console(&tty_out, buffer); in TEST_IMPL()
526 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
529 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
531 terminate_tty(&tty_out); in TEST_IMPL()
541 uv_tty_t tty_out; in TEST_IMPL() local
549 initialize_tty(&tty_out); in TEST_IMPL()
550 get_screen_info(&tty_out, &si); in TEST_IMPL()
554 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
558 write_console(&tty_out, buffer); in TEST_IMPL()
559 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
566 write_console(&tty_out, buffer); in TEST_IMPL()
567 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
574 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
576 write_console(&tty_out, buffer); in TEST_IMPL()
577 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
584 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
586 write_console(&tty_out, buffer); in TEST_IMPL()
587 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
590 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
592 terminate_tty(&tty_out); in TEST_IMPL()
602 uv_tty_t tty_out; in TEST_IMPL() local
610 initialize_tty(&tty_out); in TEST_IMPL()
611 get_screen_info(&tty_out, &si); in TEST_IMPL()
615 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
619 write_console(&tty_out, buffer); in TEST_IMPL()
620 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
627 write_console(&tty_out, buffer); in TEST_IMPL()
628 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
635 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
637 write_console(&tty_out, buffer); in TEST_IMPL()
638 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
641 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
643 terminate_tty(&tty_out); in TEST_IMPL()
653 uv_tty_t tty_out; in TEST_IMPL() local
661 initialize_tty(&tty_out); in TEST_IMPL()
662 get_screen_info(&tty_out, &si); in TEST_IMPL()
666 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
670 write_console(&tty_out, buffer); in TEST_IMPL()
671 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
678 write_console(&tty_out, buffer); in TEST_IMPL()
679 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
686 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
688 write_console(&tty_out, buffer); in TEST_IMPL()
689 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
692 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
694 terminate_tty(&tty_out); in TEST_IMPL()
704 uv_tty_t tty_out; in TEST_IMPL() local
712 initialize_tty(&tty_out); in TEST_IMPL()
713 get_screen_info(&tty_out, &si); in TEST_IMPL()
717 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
721 write_console(&tty_out, buffer); in TEST_IMPL()
722 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
728 write_console(&tty_out, buffer); in TEST_IMPL()
729 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
735 write_console(&tty_out, buffer); in TEST_IMPL()
736 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
740 terminate_tty(&tty_out); in TEST_IMPL()
750 uv_tty_t tty_out; in TEST_IMPL() local
758 initialize_tty(&tty_out); in TEST_IMPL()
759 get_screen_info(&tty_out, &si); in TEST_IMPL()
763 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
767 write_console(&tty_out, buffer); in TEST_IMPL()
768 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
775 write_console(&tty_out, buffer); in TEST_IMPL()
776 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
783 write_console(&tty_out, buffer); in TEST_IMPL()
784 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
790 write_console(&tty_out, buffer); in TEST_IMPL()
791 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
794 ASSERT(!is_scrolling(&tty_out, si)); in TEST_IMPL()
796 terminate_tty(&tty_out); in TEST_IMPL()
806 uv_tty_t tty_out; in TEST_IMPL() local
813 initialize_tty(&tty_out); in TEST_IMPL()
815 saved_cursor_visibility = get_cursor_visibility(&tty_out); in TEST_IMPL()
818 set_cursor_visibility(&tty_out, TRUE); in TEST_IMPL()
820 write_console(&tty_out, buffer); in TEST_IMPL()
821 ASSERT(!get_cursor_visibility(&tty_out)); in TEST_IMPL()
824 set_cursor_visibility(&tty_out, FALSE); in TEST_IMPL()
826 write_console(&tty_out, buffer); in TEST_IMPL()
827 ASSERT(get_cursor_visibility(&tty_out)); in TEST_IMPL()
829 set_cursor_visibility(&tty_out, saved_cursor_visibility); in TEST_IMPL()
830 terminate_tty(&tty_out); in TEST_IMPL()
841 uv_tty_t tty_out; in TEST_IMPL() local
849 initialize_tty(&tty_out); in TEST_IMPL()
853 setup_screen(&tty_out); in TEST_IMPL()
854 capture_screen(&tty_out, &expect); in TEST_IMPL()
859 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
861 write_console(&tty_out, buffer); in TEST_IMPL()
862 capture_screen(&tty_out, &actual); in TEST_IMPL()
864 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
867 setup_screen(&tty_out); in TEST_IMPL()
868 capture_screen(&tty_out, &expect); in TEST_IMPL()
871 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
873 write_console(&tty_out, buffer); in TEST_IMPL()
874 capture_screen(&tty_out, &actual); in TEST_IMPL()
876 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
880 setup_screen(&tty_out); in TEST_IMPL()
881 capture_screen(&tty_out, &expect); in TEST_IMPL()
884 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
886 write_console(&tty_out, buffer); in TEST_IMPL()
887 capture_screen(&tty_out, &actual); in TEST_IMPL()
889 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
893 setup_screen(&tty_out); in TEST_IMPL()
894 capture_screen(&tty_out, &expect); in TEST_IMPL()
897 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
899 write_console(&tty_out, buffer); in TEST_IMPL()
900 capture_screen(&tty_out, &actual); in TEST_IMPL()
902 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
904 terminate_tty(&tty_out); in TEST_IMPL()
915 uv_tty_t tty_out; in TEST_IMPL() local
923 initialize_tty(&tty_out); in TEST_IMPL()
927 setup_screen(&tty_out); in TEST_IMPL()
928 capture_screen(&tty_out, &expect); in TEST_IMPL()
933 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
935 write_console(&tty_out, buffer); in TEST_IMPL()
936 capture_screen(&tty_out, &actual); in TEST_IMPL()
938 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
941 setup_screen(&tty_out); in TEST_IMPL()
942 capture_screen(&tty_out, &expect); in TEST_IMPL()
945 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
947 write_console(&tty_out, buffer); in TEST_IMPL()
948 capture_screen(&tty_out, &actual); in TEST_IMPL()
950 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
954 setup_screen(&tty_out); in TEST_IMPL()
955 capture_screen(&tty_out, &expect); in TEST_IMPL()
958 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
960 write_console(&tty_out, buffer); in TEST_IMPL()
961 capture_screen(&tty_out, &actual); in TEST_IMPL()
963 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
967 setup_screen(&tty_out); in TEST_IMPL()
968 capture_screen(&tty_out, &expect); in TEST_IMPL()
971 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
973 write_console(&tty_out, buffer); in TEST_IMPL()
974 capture_screen(&tty_out, &actual); in TEST_IMPL()
976 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
978 terminate_tty(&tty_out); in TEST_IMPL()
988 uv_tty_t tty_out; in TEST_IMPL() local
995 initialize_tty(&tty_out); in TEST_IMPL()
997 saved_cursor_size = get_cursor_size(&tty_out); in TEST_IMPL()
1000 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1002 write_console(&tty_out, buffer); in TEST_IMPL()
1003 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_LARGE); in TEST_IMPL()
1006 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1008 write_console(&tty_out, buffer); in TEST_IMPL()
1009 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_LARGE); in TEST_IMPL()
1010 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1012 write_console(&tty_out, buffer); in TEST_IMPL()
1013 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_LARGE); in TEST_IMPL()
1016 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1018 write_console(&tty_out, buffer); in TEST_IMPL()
1019 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_SMALL); in TEST_IMPL()
1020 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1022 write_console(&tty_out, buffer); in TEST_IMPL()
1023 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_SMALL); in TEST_IMPL()
1026 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1028 write_console(&tty_out, buffer); in TEST_IMPL()
1029 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1033 write_console(&tty_out, buffer); in TEST_IMPL()
1034 ASSERT_EQ(get_cursor_size(&tty_out), saved_cursor_size); in TEST_IMPL()
1036 terminate_tty(&tty_out); in TEST_IMPL()
1051 uv_tty_t tty_out; in TEST_IMPL()
1080 initialize_tty(&tty_out); in TEST_IMPL()
1082 capture_screen(&tty_out, &expect); in TEST_IMPL()
1089 capture_screen(&tty_out, &expect); in TEST_IMPL()
1096 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1099 write_console(&tty_out, buffer); in TEST_IMPL()
1100 capture_screen(&tty_out, &actual); in TEST_IMPL()
1102 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1108 capture_screen(&tty_out, &expect); in TEST_IMPL()
1115 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1118 write_console(&tty_out, buffer); in TEST_IMPL()
1119 capture_screen(&tty_out, &actual); in TEST_IMPL()
1121 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1128 capture_screen(&tty_out, &expect); in TEST_IMPL()
1136 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1145 write_console(&tty_out, buffer); in TEST_IMPL()
1146 capture_screen(&tty_out, &actual); in TEST_IMPL()
1148 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1152 capture_screen(&tty_out, &expect); in TEST_IMPL()
1155 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1177 write_console(&tty_out, buffer); in TEST_IMPL()
1178 capture_screen(&tty_out, &actual); in TEST_IMPL()
1180 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1183 capture_screen(&tty_out, &expect); in TEST_IMPL()
1186 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1200 write_console(&tty_out, buffer); in TEST_IMPL()
1201 capture_screen(&tty_out, &actual); in TEST_IMPL()
1203 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1206 capture_screen(&tty_out, &expect); in TEST_IMPL()
1209 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1231 write_console(&tty_out, buffer); in TEST_IMPL()
1232 capture_screen(&tty_out, &actual); in TEST_IMPL()
1234 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1236 terminate_tty(&tty_out); in TEST_IMPL()
1247 uv_tty_t tty_out; in TEST_IMPL() local
1255 initialize_tty(&tty_out); in TEST_IMPL()
1256 get_screen_info(&tty_out, &si); in TEST_IMPL()
1260 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
1264 write_console(&tty_out, buffer); in TEST_IMPL()
1268 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1272 write_console(&tty_out, buffer); in TEST_IMPL()
1273 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
1279 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
1283 write_console(&tty_out, buffer); in TEST_IMPL()
1287 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1291 write_console(&tty_out, buffer); in TEST_IMPL()
1292 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
1296 terminate_tty(&tty_out); in TEST_IMPL()
1306 uv_tty_t tty_out; in TEST_IMPL() local
1316 initialize_tty(&tty_out); in TEST_IMPL()
1318 capture_screen(&tty_out, &expect); in TEST_IMPL()
1319 setup_screen(&tty_out); in TEST_IMPL()
1322 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1324 saved_cursor_size = get_cursor_size(&tty_out); in TEST_IMPL()
1325 set_cursor_size(&tty_out, in TEST_IMPL()
1328 saved_cursor_visibility = get_cursor_visibility(&tty_out); in TEST_IMPL()
1329 set_cursor_visibility(&tty_out, saved_cursor_visibility ? FALSE : TRUE); in TEST_IMPL()
1330 write_console(&tty_out, buffer); in TEST_IMPL()
1332 write_console(&tty_out, buffer); in TEST_IMPL()
1333 capture_screen(&tty_out, &actual); in TEST_IMPL()
1334 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1335 ASSERT_EQ(get_cursor_size(&tty_out), saved_cursor_size); in TEST_IMPL()
1336 ASSERT_EQ(get_cursor_visibility(&tty_out), saved_cursor_visibility); in TEST_IMPL()
1339 terminate_tty(&tty_out); in TEST_IMPL()
1353 uv_tty_t tty_out; in TEST_IMPL()
1363 initialize_tty(&tty_out); in TEST_IMPL()
1368 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1369 capture_screen(&tty_out, &expect); in TEST_IMPL()
1374 write_console(&tty_out, buffer); in TEST_IMPL()
1375 capture_screen(&tty_out, &actual); in TEST_IMPL()
1376 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1381 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1382 capture_screen(&tty_out, &expect); in TEST_IMPL()
1387 write_console(&tty_out, buffer); in TEST_IMPL()
1388 capture_screen(&tty_out, &actual); in TEST_IMPL()
1389 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1394 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1395 capture_screen(&tty_out, &expect); in TEST_IMPL()
1400 write_console(&tty_out, buffer); in TEST_IMPL()
1401 capture_screen(&tty_out, &actual); in TEST_IMPL()
1402 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1407 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1408 capture_screen(&tty_out, &expect); in TEST_IMPL()
1423 write_console(&tty_out, buffer); in TEST_IMPL()
1424 capture_screen(&tty_out, &actual); in TEST_IMPL()
1425 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1430 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1431 capture_screen(&tty_out, &expect); in TEST_IMPL()
1436 write_console(&tty_out, buffer); in TEST_IMPL()
1437 capture_screen(&tty_out, &actual); in TEST_IMPL()
1438 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1444 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1445 capture_screen(&tty_out, &expect); in TEST_IMPL()
1448 write_console(&tty_out, buffer); in TEST_IMPL()
1449 capture_screen(&tty_out, &actual); in TEST_IMPL()
1450 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1454 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1455 capture_screen(&tty_out, &expect); in TEST_IMPL()
1458 write_console(&tty_out, buffer); in TEST_IMPL()
1459 capture_screen(&tty_out, &actual); in TEST_IMPL()
1460 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1464 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1465 capture_screen(&tty_out, &expect); in TEST_IMPL()
1475 write_console(&tty_out, buffer); in TEST_IMPL()
1476 capture_screen(&tty_out, &actual); in TEST_IMPL()
1477 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1481 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1482 capture_screen(&tty_out, &expect); in TEST_IMPL()
1493 write_console(&tty_out, buffer); in TEST_IMPL()
1494 capture_screen(&tty_out, &actual); in TEST_IMPL()
1495 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1500 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1501 capture_screen(&tty_out, &expect); in TEST_IMPL()
1514 write_console(&tty_out, buffer); in TEST_IMPL()
1515 capture_screen(&tty_out, &actual); in TEST_IMPL()
1516 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1519 set_cursor_to_home(&tty_out); in TEST_IMPL()
1521 write_console(&tty_out, buffer); in TEST_IMPL()
1522 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
1529 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1530 capture_screen(&tty_out, &expect); in TEST_IMPL()
1543 write_console(&tty_out, buffer); in TEST_IMPL()
1544 capture_screen(&tty_out, &actual); in TEST_IMPL()
1545 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1548 set_cursor_to_home(&tty_out); in TEST_IMPL()
1555 write_console(&tty_out, buffer); in TEST_IMPL()
1556 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
1561 saved_cursor_size = get_cursor_size(&tty_out); in TEST_IMPL()
1562 set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1564 write_console(&tty_out, buffer); in TEST_IMPL()
1565 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1567 write_console(&tty_out, buffer); in TEST_IMPL()
1568 ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_MIDDLE); in TEST_IMPL()
1569 set_cursor_size(&tty_out, saved_cursor_size); in TEST_IMPL()
1573 write_console(&tty_out, buffer); in TEST_IMPL()
1574 ASSERT(get_cursor_visibility(&tty_out)); in TEST_IMPL()
1576 write_console(&tty_out, buffer); in TEST_IMPL()
1577 ASSERT(get_cursor_visibility(&tty_out)); in TEST_IMPL()
1580 set_cursor_position(&tty_out, cursor_pos_old); in TEST_IMPL()
1587 write_console(&tty_out, buffer); in TEST_IMPL()
1588 get_cursor_position(&tty_out, &cursor_pos); in TEST_IMPL()
1591 set_cursor_to_home(&tty_out); in TEST_IMPL()
1595 write_console(&tty_out, buffer); in TEST_IMPL()
1596 ASSERT(get_cursor_visibility(&tty_out)); in TEST_IMPL()
1600 setup_screen(&tty_out); in TEST_IMPL()
1601 capture_screen(&tty_out, &expect); in TEST_IMPL()
1602 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1604 write_console(&tty_out, buffer); in TEST_IMPL()
1605 capture_screen(&tty_out, &actual); in TEST_IMPL()
1606 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1611 set_cursor_position(&tty_out, cursor_pos); in TEST_IMPL()
1612 capture_screen(&tty_out, &expect); in TEST_IMPL()
1615 write_console(&tty_out, buffer); in TEST_IMPL()
1616 capture_screen(&tty_out, &actual); in TEST_IMPL()
1617 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1619 terminate_tty(&tty_out); in TEST_IMPL()