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