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