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