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