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