t_curses.sh revision 1.23 1 h_run()
2 {
3 file=$1
4 if [ -z "$2" ]; then
5 export LC_ALL=C
6 r_run $file
7 else
8 locale=`locale -a | grep -i $2`
9 if [ -z "${locale}" ]; then
10 atf_fail "test ${file} failed because locale ${locale} not available"
11 else
12 # export the locale and shift the parametes by two and pass the rest
13 export LC_ALL=$locale
14 shift 2
15 r_run $file $@
16 fi
17 fi
18 }
19
20 r_run()
21 {
22 file="$(atf_get_srcdir)/tests/${1}"
23 export COLUMNS=80
24 export LINES=24
25 $(atf_get_srcdir)/director $2 \
26 -T $(atf_get_srcdir) \
27 -t atf \
28 -C $(atf_get_srcdir)/check_files \
29 -s $(atf_get_srcdir)/slave $file || atf_fail "test ${file} failed"
30 }
31
32 ##########################################
33 # testframe utility functions
34 ##########################################
35
36 atf_test_case startup
37 startup_head()
38 {
39 atf_set "descr" "Checks curses initialisation sequence"
40 }
41 startup_body()
42 {
43 h_run start
44 }
45
46 atf_test_case window
47 window_head()
48 {
49 atf_set "descr" "Checks window creation"
50 }
51 window_body()
52 {
53 h_run window
54 }
55
56 atf_test_case start_slk
57 start_slk_head()
58 {
59 atf_set "descr" "Checks curses initialisation sequence with soft key labels"
60 }
61 start_slk_body()
62 {
63 h_run start_slk
64 }
65
66 atf_test_case window_hierarchy
67 window_hierarchy_head()
68 {
69 atf_set "descr" "Checks creating a hierarchy of windows"
70 }
71 window_hierarchy_body()
72 {
73 h_run window_hierarchy
74 }
75
76 atf_test_case two_window
77 two_window_head()
78 {
79 atf_set "descr" "Checks creating 2 windows"
80 }
81 two_window_body()
82 {
83 h_run two_window
84 }
85
86 atf_test_case varcheck
87 varcheck_head()
88 {
89 atf_set "descr" "Checks if the testframe CHECK command works"
90 }
91 varcheck_body()
92 {
93 h_run varcheck
94 }
95
96 ##########################################
97 # curses add characters to window routines
98 ##########################################
99
100 atf_test_case addbytes
101 addbytes_head()
102 {
103 atf_set "descr" "Tests adding bytes to stdscr"
104 }
105 addbytes_body()
106 {
107 h_run addbytes
108 }
109
110 atf_test_case addch
111 addch_head()
112 {
113 atf_set "descr" "Tests adding a chtype to stdscr"
114 }
115 addch_body()
116 {
117 h_run addch
118 }
119
120 atf_test_case waddch
121 waddch_head()
122 {
123 atf_set "descr" "Tests adding a chtype to window - tests mvwaddch too"
124 }
125 waddch_body()
126 {
127 h_run waddch
128 }
129
130 atf_test_case mvaddch
131 mvaddch_head()
132 {
133 atf_set "descr" "Move the cursor and add a character to stdscr"
134 }
135 mvaddch_body()
136 {
137 h_run mvaddch
138 }
139
140 atf_test_case addchstr
141 addchstr_head()
142 {
143 atf_set "descr" "Tests adding a chtype string to stdscr"
144 }
145 addchstr_body()
146 {
147 h_run addchstr
148 }
149
150 atf_test_case waddchstr
151 waddchstr_head()
152 {
153 atf_set "descr" "Tests adding a chtype string to window"
154 }
155 waddchstr_body()
156 {
157 h_run waddchstr
158 }
159
160 atf_test_case addchnstr
161 addchnstr_head()
162 {
163 atf_set "descr" "Tests adding bytes from a chtype string to stdscr"
164 }
165 addchnstr_body()
166 {
167 h_run addchnstr
168 }
169
170 atf_test_case waddchnstr
171 waddchnstr_head()
172 {
173 atf_set "descr" "Tests adding bytes from a chtype string to window"
174 }
175 waddchnstr_body()
176 {
177 h_run waddchnstr
178 }
179
180 atf_test_case mvaddchstr
181 mvaddchstr_head()
182 {
183 atf_set "descr" "Move the cursor and add a ch string to stdscr"
184 }
185 mvaddchstr_body()
186 {
187 h_run mvaddchstr
188 }
189
190 atf_test_case mvwaddchstr
191 mvwaddchstr_head()
192 {
193 atf_set "descr" "Move the cursor and add a ch string to window"
194 }
195 mvwaddchstr_body()
196 {
197 h_run mvwaddchstr
198 }
199
200 atf_test_case mvaddchnstr
201 mvaddchnstr_head()
202 {
203 atf_set "descr" "Move the cursor and add a limited ch string to stdscr"
204 }
205 mvaddchnstr_body()
206 {
207 h_run mvaddchnstr
208 }
209
210 atf_test_case mvwaddchnstr
211 mvwaddchnstr_head()
212 {
213 atf_set "descr" "Move the cursor and add a limited ch string to window"
214 }
215 mvwaddchnstr_body()
216 {
217 h_run mvwaddchnstr
218 }
219
220 atf_test_case addstr
221 addstr_head()
222 {
223 atf_set "descr" "Tests adding bytes from a string to stdscr"
224 }
225 addstr_body()
226 {
227 h_run addstr
228 }
229
230 atf_test_case addwstr
231 addwstr_head()
232 {
233 atf_set "descr" "Tests adding wide character string to stdscr"
234 }
235 addwstr_body()
236 {
237 h_run addwstr en_US.UTF-8
238 }
239
240 atf_test_case waddstr
241 waddstr_head()
242 {
243 atf_set "descr" "Tests adding bytes from a string to window"
244 }
245 waddstr_body()
246 {
247 h_run waddstr
248 }
249
250 atf_test_case waddwstr
251 waddwstr_head()
252 {
253 atf_set "descr" "Tests adding wide character string to window"
254 }
255 waddwstr_body()
256 {
257 h_run waddwstr en_US.UTF-8
258 }
259
260 atf_test_case addnstr
261 addnstr_head()
262 {
263 atf_set "descr" "Tests adding bytes from a string to stdscr"
264 }
265 addnstr_body()
266 {
267 h_run addnstr
268 }
269
270 atf_test_case addnwstr
271 addnwstr_head()
272 {
273 atf_set "descr" "Tests adding wide characters from string to stdscr"
274 }
275 addnwstr_body()
276 {
277 h_run addnwstr en_US.UTF-8
278 }
279
280 atf_test_case waddnstr
281 waddnstr_head()
282 {
283 atf_set "descr" "Tests adding wide characters from string to window"
284 }
285 waddnstr_body()
286 {
287 h_run waddnstr
288 }
289
290 atf_test_case waddnwstr
291 waddnwstr_head()
292 {
293 atf_set "descr" "Move the cursor and add wide characters from string to stdscr"
294 }
295 waddnwstr_body()
296 {
297 h_run waddnwstr en_US.UTF-8
298 }
299
300 atf_test_case mvwaddnwstr
301 mvwaddnwstr_head()
302 {
303 atf_set "descr" "Move the cursor and add wide characters from string to stdscr"
304 }
305 mvwaddnwstr_body()
306 {
307 h_run mvwaddnwstr en_US.UTF-8
308 }
309
310 atf_test_case mvaddstr
311 mvaddstr_head()
312 {
313 atf_set "descr" "Move the cursor and add a string to stdscr"
314 }
315 mvaddstr_body()
316 {
317 h_run mvaddstr
318 }
319
320 atf_test_case mvaddwstr
321 mvaddwstr_head()
322 {
323 atf_set "descr" "Move the cursor and add wide character string to stdscr"
324 }
325 mvaddwstr_body()
326 {
327 h_run mvaddwstr en_US.UTF-8
328 }
329
330 atf_test_case mvwaddwstr
331 mvwaddwstr_head()
332 {
333 atf_set "descr" "Move the cursor and add wide character string to window"
334 }
335 mvwaddwstr_body()
336 {
337 h_run mvwaddwstr en_US.UTF-8
338 }
339
340 atf_test_case mvwaddstr
341 mvwaddstr_head()
342 {
343 atf_set "descr" "Move the cursor and add a string to window"
344 }
345 mvwaddstr_body()
346 {
347 h_run mvwaddstr en_US.UTF-8
348 }
349
350 atf_test_case mvaddnstr
351 mvaddnstr_head()
352 {
353 atf_set "descr" "Move the cursor and add a limited string to stdscr"
354 }
355 mvaddnstr_body()
356 {
357 h_run mvaddnstr
358 }
359
360 atf_test_case mvaddnwstr
361 mvaddnwstr_head()
362 {
363 atf_set "descr" "Move the cursor and add wide characters from string to stdscr"
364 }
365 mvaddnwstr_body()
366 {
367 h_run mvaddnwstr en_US.UTF-8
368 }
369
370 atf_test_case mvwaddnstr
371 mvwaddnstr_head()
372 {
373 atf_set "descr" "Move the cursor and add wide characters from string to window"
374 }
375 mvwaddnstr_body()
376 {
377 h_run mvwaddnstr
378 }
379
380 atf_test_case add_wch
381 add_wch_head()
382 {
383 atf_set "descr" "Test adding complex character to stdscr"
384 }
385 add_wch_body()
386 {
387 h_run add_wch en_US.UTF-8
388 }
389
390 atf_test_case wadd_wch
391 wadd_wch_head()
392 {
393 atf_set "descr" "Test adding complex character to window"
394 }
395 wadd_wch_body()
396 {
397 h_run wadd_wch en_US.UTF-8
398 }
399
400 ##########################################
401 # curses input stream routines
402 ##########################################
403
404 atf_test_case getch
405 getch_head()
406 {
407 atf_set "descr" "Checks reading a character input - tests mvgetch also"
408 }
409 getch_body()
410 {
411 h_run getch
412 }
413
414 atf_test_case wgetch
415 wgetch_head()
416 {
417 atf_set "descr" "Checks reading a character input from window - tests mvwgetch also"
418 }
419 wgetch_body()
420 {
421 h_run wgetch
422 }
423
424 atf_test_case define_key
425 define_key_head()
426 {
427 atf_set "descr" "Check defining a key and removing the definition works"
428 }
429 define_key_body()
430 {
431 h_run define_key
432 }
433
434 atf_test_case keyok
435 keyok_head()
436 {
437 atf_set "descr" "Check the ability to disable interpretation of a multichar key sequence"
438 }
439 keyok_body()
440 {
441 h_run keyok
442 }
443
444 atf_test_case getnstr
445 getnstr_head()
446 {
447 atf_set "descr" "Check getting a string with a limit"
448 }
449 getnstr_body()
450 {
451 h_run getnstr
452 }
453
454 atf_test_case wgetnstr
455 wgetnstr_head()
456 {
457 atf_set "descr" "Check getting a string on window input with a limit"
458 }
459 wgetnstr_body()
460 {
461 h_run wgetnstr
462 }
463
464 atf_test_case mvgetnstr
465 mvgetnstr_head()
466 {
467 atf_set "descr" "Move the cursor and get a limited number of characters"
468 }
469 mvgetnstr_body()
470 {
471 h_run mvgetnstr
472 }
473
474 atf_test_case mvwgetnstr
475 mvwgetnstr_head()
476 {
477 atf_set "descr" "Move the cursor and get a limited number of characters on window input"
478 }
479 mvwgetnstr_body()
480 {
481 h_run mvwgetnstr
482 }
483
484 atf_test_case getstr
485 getstr_head()
486 {
487 atf_set "descr" "Check getting a string from input"
488 }
489 getstr_body()
490 {
491 h_run getstr
492 }
493
494 atf_test_case wgetstr
495 wgetstr_head()
496 {
497 atf_set "descr" "Check getting a string from window input"
498 }
499 wgetstr_body()
500 {
501 h_run wgetstr
502 }
503
504 atf_test_case mvgetstr
505 mvgetstr_head()
506 {
507 atf_set "descr" "Move the cursor and get characters"
508 }
509 mvgetstr_body()
510 {
511 h_run mvgetstr
512 }
513
514 atf_test_case mvwgetstr
515 mvwgetstr_head()
516 {
517 atf_set "descr" "Move the cursor and get characters on window input"
518 }
519 mvwgetstr_body()
520 {
521 h_run mvwgetstr
522 }
523
524 atf_test_case keyname
525 keyname_head()
526 {
527 atf_set "descr" "Convert integers into printable key names"
528 }
529 keyname_body()
530 {
531 h_run keyname
532 }
533
534 atf_test_case key_name
535 key_name_head()
536 {
537 atf_set "descr" "Convert integers into printable key names"
538 }
539 key_name_body()
540 {
541 h_run key_name en_US.UTF-8
542 }
543
544 atf_test_case keypad
545 keypad_head()
546 {
547 atf_set "descr" "Checks enable/disable abbreviation of function keys - tests is_keypad also"
548 }
549 keypad_body()
550 {
551 h_run keypad
552 }
553
554 atf_test_case notimeout
555 notimeout_head()
556 {
557 atf_set "descr" "Checks notimeout when reading a character"
558 }
559 notimeout_body()
560 {
561 h_run notimeout
562 }
563
564 atf_test_case timeout
565 timeout_head()
566 {
567 atf_set "descr" "Checks timeout when reading a character"
568 }
569 timeout_body()
570 {
571 h_run timeout
572 }
573
574 atf_test_case wtimeout
575 wtimeout_head()
576 {
577 atf_set "descr" "Checks timeout when reading a character on window"
578 }
579 wtimeout_body()
580 {
581 h_run wtimeout
582 }
583
584 atf_test_case nodelay
585 nodelay_head()
586 {
587 atf_set "descr" "Test that the nodelay call causes wget to not block"
588 }
589 nodelay_body()
590 {
591 h_run nodelay
592 }
593
594 atf_test_case unget_wch
595 unget_wch_head()
596 {
597 atf_set "descr" "Checks pushing of character into input queue - tests ungetch also"
598 }
599 unget_wch_body()
600 {
601 h_run unget_wch en_US.UTF-8
602 }
603
604 atf_test_case getn_wstr
605 getn_wstr_head()
606 {
607 atf_set "descr" "Checks getting limited characters from wide string through queue"
608 }
609 getn_wstr_body()
610 {
611 h_run getn_wstr en_US.UTF-8
612 }
613
614 atf_test_case wgetn_wstr
615 wgetn_wstr_head()
616 {
617 atf_set "descr" "Checks getting limited characters from wide string on window through queue"
618 }
619 wgetn_wstr_body()
620 {
621 h_run wgetn_wstr en_US.UTF-8
622 }
623
624 atf_test_case get_wstr
625 get_wstr_head()
626 {
627 atf_set "descr" "Checks getting characters from wide string through queue"
628 }
629 get_wstr_body()
630 {
631 h_run get_wstr en_US.UTF-8
632 }
633
634 atf_test_case wget_wstr
635 wget_wstr_head()
636 {
637 atf_set "descr" "Checks getting characters from wide string on window through queue"
638 }
639 wget_wstr_body()
640 {
641 h_run wget_wstr en_US.UTF-8
642 }
643
644 atf_test_case mvgetn_wstr
645 mvgetn_wstr_head()
646 {
647 atf_set "descr" "Move the cursor and get limited characters from wide string through queue"
648 }
649 mvgetn_wstr_body()
650 {
651 h_run mvgetn_wstr en_US.UTF-8
652 }
653
654 atf_test_case mvwgetn_wstr
655 mvwgetn_wstr_head()
656 {
657 atf_set "descr" "Move the cursor and get limited characters from wide string on window through queue"
658 }
659 mvwgetn_wstr_body()
660 {
661 h_run mvwgetn_wstr en_US.UTF-8
662 }
663
664 atf_test_case mvget_wstr
665 mvget_wstr_head()
666 {
667 atf_set "descr" "Move the cursor and get characters from wide string through queue"
668 }
669 mvget_wstr_body()
670 {
671 h_run mvget_wstr en_US.UTF-8
672 }
673
674 atf_test_case mvwget_wstr
675 mvwget_wstr_head()
676 {
677 atf_set "descr" "Move the cursor and get characters from wide string on window through queue"
678 }
679 mvwget_wstr_body()
680 {
681 h_run mvwget_wstr en_US.UTF-8
682 }
683
684 atf_test_case get_wch
685 get_wch_head()
686 {
687 atf_set "descr" "Checks reading a complex character through input queue"
688 }
689 get_wch_body()
690 {
691 h_run get_wch en_US.UTF-8
692 }
693
694 ##########################################
695 # curses read screen contents routines
696 ##########################################
697
698 atf_test_case inch
699 inch_head()
700 {
701 atf_set "descr" "Get the character under the cursor on stdscr"
702 }
703 inch_body()
704 {
705 h_run inch
706 }
707
708 atf_test_case winch
709 winch_head()
710 {
711 atf_set "descr" "Get the character under the cursor on window"
712 }
713 winch_body()
714 {
715 h_run winch
716 }
717
718 atf_test_case mvinch
719 mvinch_head()
720 {
721 atf_set "descr" "Move the cursor and get the character under the cursor on stdscr"
722 }
723 mvinch_body()
724 {
725 h_run mvinch
726 }
727
728 atf_test_case mvwinch
729 mvwinch_head()
730 {
731 atf_set "descr" "Move the cursor and get the character under the cursor on window"
732 }
733 mvwinch_body()
734 {
735 h_run mvwinch
736 }
737
738 atf_test_case inchnstr
739 inchnstr_head()
740 {
741 atf_set "descr" "Get a limited chtype string from the stdscr - tests inchstr too"
742 }
743 inchnstr_body()
744 {
745 h_run inchnstr
746 }
747
748 atf_test_case winchnstr
749 winchnstr_head()
750 {
751 atf_set "descr" "Get a limited chtype string from the window - tests winchstr too"
752 }
753 winchnstr_body()
754 {
755 h_run winchnstr
756 }
757
758 atf_test_case mvinchnstr
759 mvinchnstr_head()
760 {
761 atf_set "descr" "Move the cursor read characters from stdscr - tests both mvinchstr and mvinchnstr"
762 }
763 mvinchnstr_body()
764 {
765 h_run mvinchnstr
766 }
767
768 atf_test_case mvwinchnstr
769 mvwinchnstr_head()
770 {
771 atf_set "descr" "Move the cursor read characters from window - tests both mvinchstr and mvinchnstr"
772 }
773 mvwinchnstr_body()
774 {
775 h_run mvwinchnstr
776 }
777
778 atf_test_case innstr
779 innstr_head()
780 {
781 atf_set "descr" "Get a limited string starting at the cursor from stdscr - tests instr also"
782 }
783 innstr_body()
784 {
785 h_run innstr
786 }
787
788 atf_test_case winnstr
789 winnstr_head()
790 {
791 atf_set "descr" "Get a limited string starting at the cursor from window - tests instr also"
792 }
793 winnstr_body()
794 {
795 h_run winnstr
796 }
797
798 atf_test_case mvinnstr
799 mvinnstr_head()
800 {
801 atf_set "descr" "Move the cursor read limited characters from stdscr - tests mvinstr also"
802 }
803 mvinnstr_body()
804 {
805 h_run mvinnstr
806 }
807
808 atf_test_case mvwinnstr
809 mvwinnstr_head()
810 {
811 atf_set "descr" "Move the cursor read limited characters from window - tests mvwinstr also"
812 }
813 mvwinnstr_body()
814 {
815 h_run mvwinnstr
816 }
817
818 atf_test_case in_wch
819 in_wch_head()
820 {
821 atf_set "descr" "Read the complex character from stdscr - tests mvin_wch too"
822 }
823 in_wch_body()
824 {
825 h_run in_wch en_US.UTF-8
826 }
827
828 atf_test_case win_wch
829 win_wch_head()
830 {
831 atf_set "descr" "Read the complex character from window - tests mvwin_wch too"
832 }
833 win_wch_body()
834 {
835 h_run win_wch en_US.UTF-8
836 }
837
838 atf_test_case innwstr
839 innwstr_head()
840 {
841 atf_set "descr" "Get a limited wide string starting at the cursor from stdscr"
842 }
843 innwstr_body()
844 {
845 h_run innwstr en_US.UTF-8
846 }
847
848 atf_test_case winnwstr
849 winnwstr_head()
850 {
851 atf_set "descr" "Get a limited wide string starting at the cursor from window"
852 }
853 winnwstr_body()
854 {
855 h_run winnwstr en_US.UTF-8
856 }
857
858 atf_test_case inwstr
859 inwstr_head()
860 {
861 atf_set "descr" "Get a wide string starting at the cursor from stdscr"
862 }
863 inwstr_body()
864 {
865 h_run inwstr en_US.UTF-8
866 }
867
868 atf_test_case winwstr
869 winwstr_head()
870 {
871 atf_set "descr" "Get a wide string starting at the cursor from window"
872 }
873 winwstr_body()
874 {
875 h_run winwstr en_US.UTF-8
876 }
877
878 atf_test_case mvinnwstr
879 mvinnwstr_head()
880 {
881 atf_set "descr" "Move the cursor and get a limited wide string starting at the cursor from stdscr"
882 }
883 mvinnwstr_body()
884 {
885 h_run mvinnwstr en_US.UTF-8
886 }
887
888 atf_test_case mvwinnwstr
889 mvwinnwstr_head()
890 {
891 atf_set "descr" "Move the cursor and get a limited wide string starting at the cursor from window"
892 }
893 mvwinnwstr_body()
894 {
895 h_run mvwinnwstr en_US.UTF-8
896 }
897
898 atf_test_case mvinwstr
899 mvinwstr_head()
900 {
901 atf_set "descr" "Move the cursor and get a wide string starting at the cursor from stdscr"
902 }
903 mvinwstr_body()
904 {
905 h_run mvinwstr en_US.UTF-8
906 }
907
908 atf_test_case mvwinwstr
909 mvwinwstr_head()
910 {
911 atf_set "descr" "Move the cursor and get a limited wide string starting at the cursor from window"
912 }
913 mvwinwstr_body()
914 {
915 h_run mvwinwstr en_US.UTF-8
916 }
917
918 ##########################################
919 # curses insert character to window routines
920 ##########################################
921
922 atf_test_case insch
923 insch_head()
924 {
925 atf_set "descr" "Tests inserting a chtype to stdscr"
926 }
927 insch_body()
928 {
929 h_run insch
930 }
931
932 atf_test_case winsch
933 winsch_head()
934 {
935 atf_set "descr" "Tests inserting a chtype to window"
936 }
937 winsch_body()
938 {
939 h_run winsch
940 }
941
942 atf_test_case mvinsch
943 mvinsch_head()
944 {
945 atf_set "descr" "Move the cursor and insert a chtype to stdscr"
946 }
947 mvinsch_body()
948 {
949 h_run mvinsch
950 }
951
952 atf_test_case mvwinsch
953 mvwinsch_head()
954 {
955 atf_set "descr" "Move the cursor and insert a chtype to window"
956 }
957 mvwinsch_body()
958 {
959 h_run mvwinsch
960 }
961
962 atf_test_case ins_wch
963 ins_wch_head()
964 {
965 atf_set "descr" "Tests inserting complex character to stdscr"
966 }
967 ins_wch_body()
968 {
969 h_run ins_wch en_US.UTF-8
970 }
971
972 atf_test_case wins_wch
973 wins_wch_head()
974 {
975 atf_set "descr" "Tests inserting complex character to window"
976 }
977 wins_wch_body()
978 {
979 h_run wins_wch en_US.UTF-8
980 }
981
982 atf_test_case mvins_wch
983 mvins_wch_head()
984 {
985 atf_set "descr" "Move the cursor and insert complex character to stdscr"
986 }
987 mvins_wch_body()
988 {
989 h_run mvins_wch en_US.UTF-8
990 }
991
992 atf_test_case mvwins_wch
993 mvwins_wch_head()
994 {
995 atf_set "descr" "Move the cursor and insert complex character to window"
996 }
997 mvwins_wch_body()
998 {
999 h_run mvwins_wch en_US.UTF-8
1000 }
1001
1002 atf_test_case ins_nwstr
1003 ins_nwstr_head()
1004 {
1005 atf_set "descr" "Tests inserting a limited wide character string to stdscr"
1006 }
1007 ins_nwstr_body()
1008 {
1009 h_run ins_nwstr en_US.UTF-8
1010 }
1011
1012 atf_test_case wins_nwstr
1013 wins_nwstr_head()
1014 {
1015 atf_set "descr" "Tests inserting a limited wide character string to window"
1016 }
1017 wins_nwstr_body()
1018 {
1019 h_run wins_nwstr en_US.UTF-8
1020 }
1021
1022 atf_test_case ins_wstr
1023 ins_wstr_head()
1024 {
1025 atf_set "descr" "Tests inserting a wide character string to stdscr"
1026 }
1027 ins_wstr_body()
1028 {
1029 h_run ins_wstr en_US.UTF-8
1030 }
1031
1032 atf_test_case wins_wstr
1033 wins_wstr_head()
1034 {
1035 atf_set "descr" "Tests inserting a wide character string to window"
1036 }
1037 wins_wstr_body()
1038 {
1039 h_run wins_wstr en_US.UTF-8
1040 }
1041
1042 atf_test_case mvins_nwstr
1043 mvins_nwstr_head()
1044 {
1045 atf_set "descr" "Move the cursor and insert a limited wide character string to stdscr"
1046 }
1047 mvins_nwstr_body()
1048 {
1049 h_run mvins_nwstr en_US.UTF-8
1050 }
1051
1052 atf_test_case mvwins_nwstr
1053 mvwins_nwstr_head()
1054 {
1055 atf_set "descr" "Move the cursor and insert a limited wide character string to window"
1056 }
1057 mvwins_nwstr_body()
1058 {
1059 h_run mvwins_nwstr en_US.UTF-8
1060 }
1061
1062 atf_test_case mvins_wstr
1063 mvins_wstr_head()
1064 {
1065 atf_set "descr" "Move the cursor and insert a wide character string to stdscr"
1066 }
1067 mvins_wstr_body()
1068 {
1069 h_run mvins_wstr en_US.UTF-8
1070 }
1071
1072 atf_test_case mvwins_wstr
1073 mvwins_wstr_head()
1074 {
1075 atf_set "descr" "Move the cursor and insert a wide character string to window"
1076 }
1077 mvwins_wstr_body()
1078 {
1079 h_run mvwins_wstr en_US.UTF-8
1080 }
1081
1082 ##########################################
1083 # curses delete characters routines
1084 ##########################################
1085
1086 atf_test_case delch
1087 delch_head()
1088 {
1089 atf_set "descr" "Tests deleting a character from stdscr and window both"
1090 }
1091 delch_body()
1092 {
1093 h_run delch
1094 }
1095
1096 atf_test_case mvdelch
1097 mvdelch_head()
1098 {
1099 atf_set "descr" "Move the cursor, deletes the character from stdscr and window"
1100 }
1101 mvdelch_body()
1102 {
1103 h_run mvdelch
1104 }
1105
1106 ##########################################
1107 # curses terminal manipulation routines
1108 ##########################################
1109
1110 atf_test_case beep
1111 beep_head()
1112 {
1113 atf_set "descr" "Check sending a beep"
1114 }
1115 beep_body()
1116 {
1117 h_run beep
1118 }
1119
1120 atf_test_case flash
1121 flash_head()
1122 {
1123 atf_set "descr" "Validate curses can flash the screen"
1124 }
1125 flash_body()
1126 {
1127 h_run flash
1128 }
1129
1130 atf_test_case curs_set
1131 curs_set_head()
1132 {
1133 atf_set "descr" "Check setting the cursor visibility works"
1134 }
1135 curs_set_body()
1136 {
1137 h_run curs_set
1138 }
1139
1140 atf_test_case delay_output
1141 delay_output_head()
1142 {
1143 atf_set "descr" "Tests pausing the output"
1144 }
1145 delay_output_body()
1146 {
1147 h_run delay_output
1148 }
1149
1150 atf_test_case erasechar
1151 erasechar_head()
1152 {
1153 atf_set "descr" "Validate erase char can be retrieved"
1154 }
1155 erasechar_body()
1156 {
1157 h_run erasechar
1158 }
1159
1160 atf_test_case erasewchar
1161 erasewchar_head()
1162 {
1163 atf_set "descr" "Validate erase wide char can be retrieved"
1164 }
1165 erasewchar_body()
1166 {
1167 h_run erasewchar en_US.UTF-8
1168 }
1169
1170 atf_test_case echochar
1171 echochar_head()
1172 {
1173 atf_set "descr" "echo single-byte character and rendition to a stdscr/window and refresh"
1174 }
1175 echochar_body()
1176 {
1177 h_run echochar
1178 }
1179
1180 atf_test_case echo_wchar
1181 echo_wchar_head()
1182 {
1183 atf_set "descr" "echo wide character and rendition to a stdscr and refresh"
1184 }
1185 echo_wchar_body()
1186 {
1187 h_run echo_wchar en_US.UTF-8
1188 }
1189
1190 atf_test_case wecho_wchar
1191 wecho_wchar_head()
1192 {
1193 atf_set "descr" "echo wide character and rendition to a window and refresh"
1194 }
1195 wecho_wchar_body()
1196 {
1197 h_run wecho_wchar en_US.UTF-8
1198 }
1199
1200 atf_test_case halfdelay
1201 halfdelay_head()
1202 {
1203 atf_set "descr" "Tests seting the input mode to half delay"
1204 }
1205 halfdelay_body()
1206 {
1207 h_run halfdelay
1208 }
1209
1210 atf_test_case has_ic
1211 has_ic_head()
1212 {
1213 atf_set "descr" "Check if the terminal can insert characters and lines"
1214 }
1215 has_ic_body()
1216 {
1217 h_run has_ic
1218 }
1219
1220 atf_test_case killchar
1221 killchar_head()
1222 {
1223 atf_set "descr" "Get the value of the terminals kill character"
1224 }
1225 killchar_body()
1226 {
1227 h_run killchar
1228 }
1229
1230 atf_test_case killwchar
1231 killwchar_head()
1232 {
1233 atf_set "descr" "Get the value of the terminals wide kill character"
1234 }
1235 killwchar_body()
1236 {
1237 h_run killwchar en_US.UTF-8
1238 }
1239
1240 atf_test_case meta
1241 meta_head()
1242 {
1243 atf_set "descr" "Check setting and clearing the meta flag on a window"
1244 }
1245 meta_body()
1246 {
1247 h_run meta
1248 }
1249
1250 atf_test_case cbreak
1251 cbreak_head()
1252 {
1253 atf_set "descr" "Check cbreak mode works"
1254 }
1255 cbreak_body()
1256 {
1257 h_run cbreak
1258 }
1259
1260 atf_test_case nocbreak
1261 nocbreak_head()
1262 {
1263 atf_set "descr" "Test that the nocbreak call returns the terminal to canonical character processing"
1264 }
1265 nocbreak_body()
1266 {
1267 h_run nocbreak
1268 }
1269
1270 ##########################################
1271 # curses general attribute manipulation routines
1272 ##########################################
1273
1274 atf_test_case attributes
1275 attributes_head()
1276 {
1277 atf_set "descr" "Check setting, clearing and getting of attributes of stdscr"
1278 }
1279 attributes_body()
1280 {
1281 h_run attributes
1282 }
1283
1284 atf_test_case wattributes
1285 wattributes_head()
1286 {
1287 atf_set "descr" "Check setting, clearing and getting of attributes of window"
1288 }
1289 wattributes_body()
1290 {
1291 h_run wattributes
1292 }
1293
1294 atf_test_case getattrs
1295 getattrs_head()
1296 {
1297 atf_set "descr" "Validate curses can get and set attributes on a window"
1298 }
1299 getattrs_body()
1300 {
1301 h_run getattrs
1302 }
1303
1304 atf_test_case color_set
1305 color_set_head()
1306 {
1307 atf_set "descr" "Validate curses can set the color pair for stdscr"
1308 }
1309 color_set_body()
1310 {
1311 h_run color_set
1312 }
1313
1314 atf_test_case wcolor_set
1315 wcolor_set_head()
1316 {
1317 atf_set "descr" "Validate curses can set the color pair for window"
1318 }
1319 wcolor_set_body()
1320 {
1321 h_run wcolor_set
1322 }
1323
1324 atf_test_case termattrs
1325 termattrs_head()
1326 {
1327 atf_set "descr" "Check the terminal attributes"
1328 }
1329 termattrs_body()
1330 {
1331 h_run termattrs
1332 }
1333
1334 ##########################################
1335 # curses on-screen attribute manipulation routines
1336 ##########################################
1337
1338 atf_test_case chgat
1339 chgat_head()
1340 {
1341 atf_set "descr" "Check changing attributes works on stdscr"
1342 }
1343 chgat_body()
1344 {
1345 h_run chgat
1346 }
1347
1348 atf_test_case wchgat
1349 wchgat_head()
1350 {
1351 atf_set "descr" "Check changing attributes works on window"
1352 }
1353 wchgat_body()
1354 {
1355 h_run wchgat
1356 }
1357
1358 atf_test_case mvchgat
1359 mvchgat_head()
1360 {
1361 atf_set "descr" "Move the cursor and change the attributes on the screen"
1362 }
1363 mvchgat_body()
1364 {
1365 h_run mvchgat
1366 }
1367
1368 atf_test_case mvwchgat
1369 mvwchgat_head()
1370 {
1371 atf_set "descr" "Move the cursor and change the attributes on the window"
1372 }
1373 mvwchgat_body()
1374 {
1375 h_run mvwchgat
1376 }
1377
1378 ##########################################
1379 # curses standout attribute manipulation routines
1380 ##########################################
1381
1382 atf_test_case standout
1383 standout_head()
1384 {
1385 atf_set "descr" "Checks tuning on/off of standard attribute on stdscr"
1386 }
1387 standout_body()
1388 {
1389 h_run standout
1390 }
1391
1392 atf_test_case wstandout
1393 wstandout_head()
1394 {
1395 atf_set "descr" "Checks tuning on/off of standard attribute on window"
1396 }
1397 wstandout_body()
1398 {
1399 h_run wstandout
1400 }
1401
1402 ##########################################
1403 # curses color manipulation routines
1404 ##########################################
1405
1406 atf_test_case has_colors
1407 has_colors_head()
1408 {
1409 atf_set "descr" "Check if the terminal can support colours"
1410 }
1411 has_colors_body()
1412 {
1413 h_run has_colors
1414 }
1415
1416 atf_test_case can_change_color
1417 can_change_color_head()
1418 {
1419 atf_set "descr" "Check if the terminal can change colours"
1420 }
1421 can_change_color_body()
1422 {
1423 h_run can_change_color
1424 }
1425
1426 atf_test_case start_color
1427 start_color_head()
1428 {
1429 atf_set "descr" "Check if curses can enable use of colours"
1430 }
1431 start_color_body()
1432 {
1433 h_run start_color
1434 }
1435
1436 atf_test_case pair_content
1437 pair_content_head()
1438 {
1439 atf_set "descr" "Checks color pair initialization and retrieval"
1440 }
1441 pair_content_body()
1442 {
1443 h_run pair_content
1444 }
1445
1446 atf_test_case init_color
1447 init_color_head()
1448 {
1449 atf_set "descr" "Set a custom color entry"
1450 }
1451 init_color_body()
1452 {
1453 h_run init_color
1454 }
1455
1456 atf_test_case color_content
1457 color_content_head()
1458 {
1459 atf_set "descr" "Check if curses can extract the color intensity from colors"
1460 }
1461 color_content_body()
1462 {
1463 h_run color_content
1464 }
1465
1466 atf_test_case assume_default_colors
1467 assume_default_colors_head()
1468 {
1469 atf_set "descr" "Check setting the default color pair"
1470 }
1471 assume_default_colors_body()
1472 {
1473 h_run assume_default_colors
1474 }
1475
1476 ##########################################
1477 # curses clear window routines
1478 ##########################################
1479
1480 atf_test_case clear
1481 clear_head()
1482 {
1483 atf_set "descr" "Check clear,erase,clrtobot,clrtoeol work - tests window routines too"
1484 }
1485 clear_body()
1486 {
1487 h_run clear
1488 }
1489
1490 atf_test_case clearok
1491 clearok_head()
1492 {
1493 atf_set "descr" "Check clearing of screen during a refresh if correspnding flag is set"
1494 }
1495 clearok_body()
1496 {
1497 h_run clearok
1498 }
1499
1500 ##########################################
1501 # curses terminal update routines
1502 ##########################################
1503
1504 atf_test_case doupdate
1505 doupdate_head()
1506 {
1507 atf_set "descr" "Check doupdate performs an update - test wnoutrefresh too"
1508 }
1509 doupdate_body()
1510 {
1511 h_run doupdate
1512 }
1513
1514 atf_test_case immedok
1515 immedok_head()
1516 {
1517 atf_set "descr" "Checks if the screen is refreshed whenever window is changed"
1518 }
1519 immedok_body()
1520 {
1521 h_run immedok
1522 }
1523
1524 atf_test_case leaveok
1525 leaveok_head()
1526 {
1527 atf_set "descr" "Checks cursor positioning from refresh operations - tests is_leaveok too"
1528 }
1529 leaveok_body()
1530 {
1531 h_run leaveok
1532 }
1533
1534 ##########################################
1535 # curses window scrolling routines
1536 ##########################################
1537
1538 atf_test_case wscrl
1539 wscrl_head()
1540 {
1541 atf_set "descr" "Check window scrolling"
1542 }
1543 wscrl_body()
1544 {
1545 h_run wscrl
1546 }
1547
1548 atf_test_case scroll
1549 scroll_head()
1550 {
1551 atf_set "descr" "Checks scrolling"
1552 }
1553 scroll_body()
1554 {
1555 h_run scroll
1556 }
1557
1558 atf_test_case setscrreg
1559 setscrreg_head()
1560 {
1561 atf_set "descr" "Checks if setting the scrolling region works for stdscr"
1562 }
1563 setscrreg_body()
1564 {
1565 h_run setscrreg
1566 }
1567
1568 atf_test_case wsetscrreg
1569 wsetscrreg_head()
1570 {
1571 atf_set "descr" "Checks if setting the scrolling region works for window"
1572 }
1573 wsetscrreg_body()
1574 {
1575 h_run wsetscrreg
1576 }
1577
1578 ##########################################
1579 # curses window modification routines
1580 ##########################################
1581
1582 atf_test_case touchline
1583 touchline_head()
1584 {
1585 atf_set "descr" "Checks touchline to touch lines"
1586 }
1587 touchline_body()
1588 {
1589 h_run touchline
1590 }
1591
1592 atf_test_case touchoverlap
1593 touchoverlap_head()
1594 {
1595 atf_set "descr" "Check touching of partial and full overlap of windows"
1596 }
1597 touchoverlap_body()
1598 {
1599 h_run touchoverlap
1600 }
1601
1602 atf_test_case touchwin
1603 touchwin_head()
1604 {
1605 atf_set "descr" "Tests touching of window to completely refresh it"
1606 }
1607 touchwin_body()
1608 {
1609 h_run touchwin
1610 }
1611
1612 atf_test_case untouchwin
1613 untouchwin_head()
1614 {
1615 atf_set "descr" "Tests untouching the changes made to window so they are not reflected in refresh"
1616 }
1617 untouchwin_body()
1618 {
1619 h_run untouchwin
1620 }
1621
1622 atf_test_case wtouchln
1623 wtouchln_head()
1624 {
1625 atf_set "descr" "Tests touching of mulitple lines in window"
1626 }
1627 wtouchln_body()
1628 {
1629 h_run wtouchln
1630 }
1631
1632 atf_test_case is_linetouched
1633 is_linetouched_head()
1634 {
1635 atf_set "descr" "Check if a line has been modified in a window"
1636 }
1637 is_linetouched_body()
1638 {
1639 h_run is_linetouched
1640 }
1641
1642 atf_test_case is_wintouched
1643 is_wintouched_head()
1644 {
1645 atf_set "descr" "Check if a window has been modified"
1646 }
1647 is_wintouched_body()
1648 {
1649 h_run is_wintouched
1650 }
1651
1652 atf_test_case redrawwin
1653 redrawwin_head()
1654 {
1655 atf_set "descr" "Tests marking whole window as touched and redraw it"
1656 }
1657 redrawwin_body()
1658 {
1659 h_run redrawwin
1660 }
1661
1662 atf_test_case wredrawln
1663 wredrawln_head()
1664 {
1665 atf_set "descr" "Tests marking line in window as touched and redraw it"
1666 }
1667 wredrawln_body()
1668 {
1669 h_run wredrawln
1670 }
1671
1672 ##########################################
1673 # curses soft label key routines
1674 ##########################################
1675
1676 atf_test_case slk
1677 slk_head()
1678 {
1679 atf_set "descr" "Tests routines related to soft key labels"
1680 }
1681 slk_body()
1682 {
1683 h_run slk en_US.UTF-8
1684 }
1685
1686 ##########################################
1687 # curses draw lines on windows routines
1688 ##########################################
1689
1690 atf_test_case hline
1691 hline_head()
1692 {
1693 atf_set "descr" "Draw a horizontal line on stdscr"
1694 }
1695 hline_body()
1696 {
1697 h_run hline
1698 }
1699
1700 atf_test_case whline
1701 whline_head()
1702 {
1703 atf_set "descr" "Draw a horizontal line on window - tests mvwhline too"
1704 }
1705 whline_body()
1706 {
1707 h_run whline
1708 }
1709
1710 atf_test_case mvhline
1711 mvhline_head()
1712 {
1713 atf_set "descr" "Move the cursor and draw a horizontal line"
1714 }
1715 mvhline_body()
1716 {
1717 h_run mvhline
1718 }
1719
1720 atf_test_case wvline
1721 wvline_head()
1722 {
1723 atf_set "descr" "Draw a vertical line on window - tests mvwvline too"
1724 }
1725 wvline_body()
1726 {
1727 h_run wvline
1728 }
1729
1730 atf_test_case mvvline
1731 mvvline_head()
1732 {
1733 atf_set "descr" "Move the cursor and draw a vertical line - tests vline too"
1734 }
1735 mvvline_body()
1736 {
1737 h_run mvvline
1738 }
1739
1740 atf_test_case hline_set
1741 hline_set_head()
1742 {
1743 atf_set "descr" "Draws a horizontal line on stdscr using complex character"
1744 }
1745 hline_set_body()
1746 {
1747 h_run hline_set en_US.UTF-8
1748 }
1749
1750 atf_test_case whline_set
1751 whline_set_head()
1752 {
1753 atf_set "descr" "Draws a horizontal line on window using complex character"
1754 }
1755 whline_set_body()
1756 {
1757 h_run whline_set en_US.UTF-8
1758 }
1759
1760 atf_test_case vline_set
1761 vline_set_head()
1762 {
1763 atf_set "descr" "Draws a vertical line on stdscr using complex character"
1764 }
1765 vline_set_body()
1766 {
1767 h_run vline_set en_US.UTF-8
1768 }
1769
1770 atf_test_case wvline_set
1771 wvline_set_head()
1772 {
1773 atf_set "descr" "Draws a vertical line on window using complex character"
1774 }
1775 wvline_set_body()
1776 {
1777 h_run wvline_set en_US.UTF-8
1778 }
1779
1780 ##########################################
1781 # curses pad routines
1782 ##########################################
1783
1784 atf_test_case pad
1785 pad_head()
1786 {
1787 atf_set "descr" "Test the newpad, subpad, pnoutrefresh and prefresh functions"
1788 }
1789 pad_body()
1790 {
1791 h_run pad
1792 }
1793
1794 atf_test_case pechochar
1795 pechochar_head()
1796 {
1797 atf_set "descr" "Tests pechochar and pecho_wchar functions"
1798 }
1799 pechochar_body()
1800 {
1801 h_run pechochar en_US.UTF-8
1802 }
1803
1804 ##########################################
1805 # curses cursor and window location and positioning routines
1806 ##########################################
1807
1808 atf_test_case cursor
1809 cursor_head()
1810 {
1811 atf_set "descr" "Tests cursor positioning and window location routines"
1812 }
1813 cursor_body()
1814 {
1815 h_run cursor
1816 }
1817
1818 atf_test_case getcurx
1819 getcurx_head()
1820 {
1821 atf_set "descr" "Validate curses getting cursor locations in a window"
1822 }
1823 getcurx_body()
1824 {
1825 h_run getcurx
1826 }
1827
1828 atf_test_case getmaxx
1829 getmaxx_head()
1830 {
1831 atf_set "descr" "Validate curses getting the maximum x value of a window"
1832 }
1833 getmaxx_body()
1834 {
1835 h_run getmaxx
1836 }
1837
1838 atf_test_case getmaxy
1839 getmaxy_head()
1840 {
1841 atf_set "descr" "Validate curses getting the maximum y value of a window"
1842 }
1843 getmaxy_body()
1844 {
1845 h_run getmaxy
1846 }
1847
1848 atf_test_case getparx
1849 getparx_head()
1850 {
1851 atf_set "descr" "Check getting the location of a window relative to its parent"
1852 }
1853 getparx_body()
1854 {
1855 h_run getparx
1856 }
1857
1858 atf_test_case getbegy
1859 getbegy_head()
1860 {
1861 atf_set "descr" "Validate curses getting the maximum y value of a window"
1862 }
1863 getbegy_body()
1864 {
1865 h_run getbegy
1866 }
1867
1868 atf_test_case getbegx
1869 getbegx_head()
1870 {
1871 atf_set "descr" "Validate curses getting the maximum y value of a window"
1872 }
1873 getbegx_body()
1874 {
1875 h_run getbegx
1876 }
1877
1878 atf_test_case mvcur
1879 mvcur_head()
1880 {
1881 atf_set "descr" "Move the cursor on the screen"
1882 }
1883 mvcur_body()
1884 {
1885 h_run mvcur
1886 }
1887
1888
1889 ##########################################
1890 # curses window routines
1891 ##########################################
1892
1893 atf_test_case copywin
1894 copywin_head()
1895 {
1896 atf_set "descr" "Check all the modes of copying a window work"
1897 }
1898 copywin_body()
1899 {
1900 h_run copywin
1901 }
1902
1903 atf_test_case dupwin
1904 dupwin_head()
1905 {
1906 atf_set "descr" "Check duplicating a window works"
1907 }
1908 dupwin_body()
1909 {
1910 h_run dupwin
1911 }
1912
1913 atf_test_case delwin
1914 delwin_head()
1915 {
1916 atf_set "descr" "Tests deleting a window"
1917 }
1918 delwin_body()
1919 {
1920 h_run delwin
1921 }
1922
1923 atf_test_case derwin
1924 derwin_head()
1925 {
1926 atf_set "descr" "Check derived subwindow creation behaves correctly."
1927 }
1928 derwin_body()
1929 {
1930 h_run derwin
1931 }
1932
1933 atf_test_case mvwin
1934 mvwin_head()
1935 {
1936 atf_set "descr" "Check moving a window"
1937 }
1938 mvwin_body()
1939 {
1940 h_run mvwin
1941 }
1942
1943 atf_test_case mvderwin
1944 mvderwin_head()
1945 {
1946 atf_set "descr" "Move the mapping of a region relative to the parent"
1947 }
1948 mvderwin_body()
1949 {
1950 h_run mvderwin
1951 }
1952
1953 atf_test_case newwin
1954 newwin_head()
1955 {
1956 atf_set "descr" "Check creating a new window"
1957 }
1958 newwin_body()
1959 {
1960 h_run newwin
1961 }
1962
1963 atf_test_case overlay
1964 overlay_head()
1965 {
1966 atf_set "descr" "Checks overlaying the overlapping portion of two windows"
1967 }
1968 overlay_body()
1969 {
1970 h_run overlay
1971 }
1972
1973 atf_test_case overwrite
1974 overwrite_head()
1975 {
1976 atf_set "descr" "Checks overwriting the overlapping portion of two windows"
1977 }
1978 overwrite_body()
1979 {
1980 h_run overwrite en_US.UTF-8
1981 }
1982
1983 atf_test_case getwin
1984 getwin_head()
1985 {
1986 atf_set "descr" "Tests dumping window to, and reloading window from, a file"
1987 }
1988 getwin_body()
1989 {
1990 h_run getwin
1991 }
1992
1993 ##########################################
1994 # curses background attribute manipulation routines
1995 ##########################################
1996
1997 atf_test_case background
1998 background_head()
1999 {
2000 atf_set "descr" "Check setting background character and attributes for both stdscr and a window."
2001 }
2002 background_body()
2003 {
2004 h_run background
2005 }
2006
2007 atf_test_case bkgdset
2008 bkgdset_head()
2009 {
2010 atf_set "descr" "Validate curses set the background attributes on stdscr"
2011 }
2012 bkgdset_body()
2013 {
2014 h_run bkgdset
2015 }
2016
2017 atf_test_case getbkgd
2018 getbkgd_head()
2019 {
2020 atf_set "descr" "Validate curses getting the background attributes on stdscr"
2021 }
2022 getbkgd_body()
2023 {
2024 h_run getbkgd
2025 }
2026
2027 ##########################################
2028 # curses border drawing routines
2029 ##########################################
2030
2031 atf_test_case box
2032 box_head()
2033 {
2034 atf_set "descr" "Checks drawing a box around a window"
2035 }
2036 box_body()
2037 {
2038 h_run box
2039 }
2040
2041 atf_test_case box_set
2042 box_set_head()
2043 {
2044 atf_set "descr" "Checks drawing the box from complex character"
2045 }
2046 box_set_body()
2047 {
2048 h_run box_set en_US.UTF-8
2049 }
2050
2051 atf_test_case wborder
2052 wborder_head()
2053 {
2054 atf_set "descr" "Checks drawing a border around a window"
2055 }
2056 wborder_body()
2057 {
2058 h_run wborder
2059 }
2060
2061 atf_test_case border_set
2062 border_set_head()
2063 {
2064 atf_set "descr" "Checks drawing borders from complex characters and renditions on stdscr"
2065 }
2066 border_set_body()
2067 {
2068 h_run border_set en_US.UTF-8
2069 }
2070
2071 atf_test_case wborder_set
2072 wborder_set_head()
2073 {
2074 atf_set "descr" "Checks drawing borders from complex characters and renditions on window"
2075 }
2076 wborder_set_body()
2077 {
2078 h_run wborder_set en_US.UTF-8
2079 }
2080
2081 ##########################################
2082 # curses insert or delete lines routines
2083 ##########################################
2084
2085 atf_test_case deleteln
2086 deleteln_head()
2087 {
2088 atf_set "descr" "Checks curses can delete lines from stdscr and window both"
2089 }
2090 deleteln_body()
2091 {
2092 h_run deleteln
2093 }
2094
2095 atf_test_case insertln
2096 insertln_head()
2097 {
2098 atf_set "descr" "Checks curses can insert lines from stdscr and window both"
2099 }
2100 insertln_body()
2101 {
2102 h_run insertln
2103 }
2104
2105 atf_test_case insdelln
2106 insdelln_head()
2107 {
2108 atf_set "descr" "Checks curses can insert/delete lines from stdscr and window both based on argument"
2109 }
2110 insdelln_body()
2111 {
2112 h_run insdelln
2113 }
2114
2115 ##########################################
2116 # curses print formatted strings on windows routines
2117 ##########################################
2118
2119 atf_test_case wprintw
2120 wprintw_head()
2121 {
2122 atf_set "descr" "Checks printing to a window"
2123 }
2124 wprintw_body()
2125 {
2126 h_run wprintw
2127 }
2128
2129 atf_test_case mvprintw
2130 mvprintw_head()
2131 {
2132 atf_set "descr" "Move the cursor and print a string"
2133 }
2134 mvprintw_body()
2135 {
2136 h_run mvprintw
2137 }
2138
2139 atf_test_case mvscanw
2140 mvscanw_head()
2141 {
2142 atf_set "descr" "Move the cursor and scan for input patterns"
2143 }
2144 mvscanw_body()
2145 {
2146 h_run mvscanw
2147 }
2148
2149 ##########################################
2150 # curses underscore attribute manipulation routines
2151 ##########################################
2152
2153 atf_test_case underscore
2154 underscore_head()
2155 {
2156 atf_set "descr" "Manipulate underscore attribute on stdscr"
2157 }
2158 underscore_body()
2159 {
2160 h_run underscore
2161 }
2162
2163 atf_test_case wunderscore
2164 wunderscore_head()
2165 {
2166 atf_set "descr" "Manipulate underscore attribute on window"
2167 }
2168 wunderscore_body()
2169 {
2170 h_run wunderscore
2171 }
2172
2173 atf_init_test_cases()
2174 {
2175 # testframe utility functions
2176 atf_add_test_case startup
2177 atf_add_test_case window
2178 atf_add_test_case start_slk
2179 atf_add_test_case window_hierarchy
2180 atf_add_test_case two_window
2181 atf_add_test_case varcheck
2182
2183 # curses add characters to window routines
2184 atf_add_test_case addbytes
2185 atf_add_test_case addch
2186 atf_add_test_case waddch
2187 atf_add_test_case mvaddch
2188 atf_add_test_case addchstr
2189 atf_add_test_case waddchstr
2190 atf_add_test_case addchnstr
2191 atf_add_test_case waddchnstr
2192 atf_add_test_case mvaddchstr
2193 atf_add_test_case mvwaddchstr
2194 atf_add_test_case mvaddchnstr
2195 atf_add_test_case mvwaddchnstr
2196 atf_add_test_case addstr
2197 atf_add_test_case addwstr
2198 atf_add_test_case waddstr
2199 atf_add_test_case waddwstr
2200 atf_add_test_case addnstr
2201 atf_add_test_case addnwstr
2202 atf_add_test_case waddnstr
2203 atf_add_test_case waddnwstr
2204 atf_add_test_case mvwaddnwstr
2205 atf_add_test_case mvaddstr
2206 atf_add_test_case mvaddwstr
2207 atf_add_test_case mvwaddwstr
2208 atf_add_test_case mvwaddstr
2209 atf_add_test_case mvaddnstr
2210 atf_add_test_case mvaddnwstr
2211 atf_add_test_case mvwaddnstr
2212 atf_add_test_case add_wch
2213 atf_add_test_case wadd_wch
2214
2215 # curses input stream routines
2216 atf_add_test_case getch
2217 #atf_add_test_case wgetch [test is missing]
2218 atf_add_test_case define_key
2219 atf_add_test_case keyok
2220 atf_add_test_case getnstr
2221 atf_add_test_case wgetnstr
2222 atf_add_test_case mvgetnstr
2223 atf_add_test_case mvwgetnstr
2224 atf_add_test_case getstr
2225 atf_add_test_case wgetstr
2226 atf_add_test_case mvgetstr
2227 atf_add_test_case mvwgetstr
2228 atf_add_test_case keyname
2229 atf_add_test_case key_name
2230 atf_add_test_case keypad
2231 atf_add_test_case notimeout
2232 atf_add_test_case timeout
2233 atf_add_test_case wtimeout
2234 atf_add_test_case nodelay
2235 atf_add_test_case unget_wch
2236 atf_add_test_case getn_wstr
2237 atf_add_test_case wgetn_wstr
2238 atf_add_test_case get_wstr
2239 atf_add_test_case wget_wstr
2240 atf_add_test_case mvgetn_wstr
2241 atf_add_test_case mvwgetn_wstr
2242 atf_add_test_case mvget_wstr
2243 atf_add_test_case mvwget_wstr
2244 atf_add_test_case get_wch
2245
2246 # curses read screen contents routines
2247 atf_add_test_case inch
2248 atf_add_test_case winch
2249 atf_add_test_case mvinch
2250 atf_add_test_case mvwinch
2251 atf_add_test_case inchnstr
2252 atf_add_test_case winchnstr
2253 atf_add_test_case mvinchnstr
2254 atf_add_test_case mvwinchnstr
2255 atf_add_test_case innstr
2256 atf_add_test_case winnstr
2257 atf_add_test_case mvinnstr
2258 atf_add_test_case mvwinnstr
2259 atf_add_test_case in_wch
2260 atf_add_test_case win_wch
2261 atf_add_test_case innwstr
2262 atf_add_test_case winnwstr
2263 atf_add_test_case inwstr
2264 atf_add_test_case winwstr
2265 atf_add_test_case mvinnwstr
2266 atf_add_test_case mvwinnwstr
2267 atf_add_test_case mvinwstr
2268 atf_add_test_case mvwinwstr
2269
2270 # curses insert character to window routines
2271 atf_add_test_case insch
2272 atf_add_test_case winsch
2273 atf_add_test_case mvinsch
2274 atf_add_test_case mvwinsch
2275 atf_add_test_case ins_wch
2276 atf_add_test_case wins_wch
2277 atf_add_test_case mvins_wch
2278 atf_add_test_case mvwins_wch
2279 atf_add_test_case ins_nwstr
2280 atf_add_test_case wins_nwstr
2281 atf_add_test_case ins_wstr
2282 atf_add_test_case wins_wstr
2283 atf_add_test_case mvins_nwstr
2284 atf_add_test_case mvwins_nwstr
2285 atf_add_test_case mvins_wstr
2286 atf_add_test_case mvwins_wstr
2287
2288 # curses delete characters routines
2289 atf_add_test_case delch
2290 atf_add_test_case mvdelch
2291
2292 # curses terminal manipulation routines
2293 atf_add_test_case beep
2294 atf_add_test_case flash
2295 atf_add_test_case curs_set
2296 # atf_add_test_case delay_output [WORKS CORRECTLY BUT FAILS IN TESTFRAME]
2297 atf_add_test_case erasechar
2298 atf_add_test_case erasewchar
2299 atf_add_test_case echochar
2300 atf_add_test_case echo_wchar
2301 atf_add_test_case wecho_wchar
2302 atf_add_test_case halfdelay
2303 atf_add_test_case has_ic
2304 atf_add_test_case killchar
2305 atf_add_test_case killwchar
2306 atf_add_test_case meta
2307 atf_add_test_case cbreak
2308 atf_add_test_case nocbreak
2309
2310 # curses general attribute manipulation routines
2311 atf_add_test_case attributes
2312 atf_add_test_case wattributes
2313 atf_add_test_case getattrs
2314 atf_add_test_case color_set
2315 atf_add_test_case wcolor_set
2316 atf_add_test_case termattrs
2317
2318 # curses on-screen attribute manipulation routines
2319 atf_add_test_case chgat
2320 atf_add_test_case wchgat
2321 atf_add_test_case mvchgat
2322 atf_add_test_case mvwchgat
2323
2324 # curses standout attribute manipulation routines
2325 atf_add_test_case standout
2326 atf_add_test_case wstandout
2327
2328 # curses color manipulation routines
2329 atf_add_test_case has_colors
2330 atf_add_test_case can_change_color
2331 atf_add_test_case start_color
2332 atf_add_test_case pair_content
2333 atf_add_test_case init_color
2334 atf_add_test_case color_content
2335 atf_add_test_case assume_default_colors
2336
2337 # curses clear window routines
2338 atf_add_test_case clear
2339 atf_add_test_case clearok
2340
2341 # curses terminal update routines
2342 atf_add_test_case doupdate
2343 atf_add_test_case immedok
2344 atf_add_test_case leaveok
2345
2346 # curses window scrolling routines
2347 atf_add_test_case wscrl
2348 atf_add_test_case scroll
2349 atf_add_test_case setscrreg
2350 atf_add_test_case wsetscrreg
2351
2352 # curses window modification routines
2353 atf_add_test_case touchline
2354 atf_add_test_case touchoverlap
2355 atf_add_test_case touchwin
2356 atf_add_test_case untouchwin
2357 atf_add_test_case wtouchln
2358 atf_add_test_case is_linetouched
2359 atf_add_test_case is_wintouched
2360 atf_add_test_case redrawwin
2361 atf_add_test_case wredrawln
2362
2363 # curses soft label key routines
2364 atf_add_test_case slk
2365
2366 # curses draw lines on windows routines
2367 atf_add_test_case hline
2368 atf_add_test_case whline
2369 atf_add_test_case mvhline
2370 atf_add_test_case wvline
2371 atf_add_test_case mvvline
2372 atf_add_test_case hline_set
2373 atf_add_test_case whline_set
2374 atf_add_test_case vline_set
2375 atf_add_test_case wvline_set
2376
2377 # curses pad routines
2378 atf_add_test_case pad
2379 atf_add_test_case pechochar
2380
2381 # curses cursor and window location and positioning routines
2382 atf_add_test_case cursor
2383 atf_add_test_case getcurx
2384 atf_add_test_case getmaxx
2385 atf_add_test_case getmaxy
2386 atf_add_test_case getparx
2387 atf_add_test_case getbegy
2388 atf_add_test_case getbegx
2389 atf_add_test_case mvcur
2390
2391 # curses window routines
2392 atf_add_test_case copywin
2393 atf_add_test_case dupwin
2394 # atf_add_test_case delwin [FAILING]
2395 atf_add_test_case derwin
2396 atf_add_test_case mvwin
2397 atf_add_test_case mvderwin
2398 atf_add_test_case newwin
2399 atf_add_test_case overlay
2400 atf_add_test_case overwrite
2401 atf_add_test_case getwin
2402
2403 # curses background attribute manipulation routines
2404 atf_add_test_case background
2405 atf_add_test_case bkgdset
2406 atf_add_test_case getbkgd
2407
2408 # curses border drawing routines
2409 atf_add_test_case box
2410 atf_add_test_case box_set
2411 atf_add_test_case wborder
2412 atf_add_test_case border_set
2413 atf_add_test_case wborder_set
2414
2415 # curses insert or delete lines routines
2416 atf_add_test_case deleteln
2417 atf_add_test_case insertln
2418 atf_add_test_case insdelln
2419
2420 # curses print formatted strings on windows routines
2421 atf_add_test_case wprintw
2422 atf_add_test_case mvprintw
2423 atf_add_test_case mvscanw
2424
2425 # curses underscore attribute manipulation routines
2426 atf_add_test_case underscore
2427 atf_add_test_case wunderscore
2428 }
2429