New tests and updates for corrected behaviour due to fix for PR56224
* Added extra testing to the addstr test to demonstrate bug described in PR#56224 and validate case when scrolling enabled still works. * Fixed slk test, the slk_init output changed due to corrected wrapping, slk_restore no longer returns ERR probably due to addwchar no longer returning ERR when an implicit scroll was attempted when scrolling disabled. Commented out the slk_wset test, this is now returning ERR instead of misbehaving, needs investigation.
This commit is contained in:
parent
a66f3670d9
commit
880393fc5e
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.6 2021/06/05 06:11:09 blymn Exp $
|
||||
# $NetBSD: Makefile,v 1.7 2021/06/06 04:57:58 blymn Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
|
@ -21,6 +21,8 @@ FILES+= addnstr.chk
|
|||
FILES+= addnwstr1.chk
|
||||
FILES+= addnwstr2.chk
|
||||
FILES+= addstr.chk
|
||||
FILES+= addstr2.chk
|
||||
FILES+= addstr3.chk
|
||||
FILES+= addwstr1.chk
|
||||
FILES+= addwstr2.chk
|
||||
FILES+= addwstr3.chk
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
cup24;1X0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456clearcup24;76Xa
|
|
@ -0,0 +1,2 @@
|
|||
cup22;76Xa 0cup23;1X123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(cup24;1X)cup24;76Xel
)clearcup23;76Xa
|
||||
hello
|
|
@ -1 +1 @@
|
|||
cup24;1Xrevone sgr0
smsosmulrev one rmsormulsgr0
smsorev onermsosgr0cup24;42Xsmulrev five cup24;73Xeight!!rmam!smamcup24;50Xrmulsgr0
|
||||
cup24;1Xrevone sgr0
smsosmulrev one rmsormulsgr0
smsorev onermsosgr0cup24;42Xsmulrev five cup24;73Xeight!!cup24;50Xrmulsgr0
|
|
@ -1 +1 @@
|
|||
smulrev one five eight!!rmam!smamcup24;1Xrmulsgr0
|
||||
smulrev one five eight!!rmulsgr0
|
|
@ -1 +1 @@
|
|||
cup24;1Xsmulrev onesgr0 smulrev two sgr0 smulrev sgr0 smulrev sgr0 smulrev five sgr0 smulrev sgr0 smulrev sgr0 smulreveight!!rmam!smamcup24;18Xrmulsgr0
|
||||
cup24;1Xsmulrev onesgr0 smulrev two sgr0 smulrev sgr0 smulrev sgr0 smulrev five sgr0 smulrev sgr0 smulrev sgr0 smulreveight!!rmulsgr0elcup24;18X
|
|
@ -1 +1 @@
|
|||
op
setaf7Xsetab0Xsmulrev onesgr0setaf7Xsetab0X smulrev two sgr0setaf7Xsetab0X smulrev sgr0setaf7Xsetab0X setaf1Xsetab2Xsmulrev foursgr0setaf7Xsetab0X smulrev five sgr0setaf7Xsetab0X smulrev sgr0setaf7Xsetab0X smulrev sgr0setaf7Xsetab0X smulreveight!!rmam!smamcup24;40Xrmulsgr0op
|
||||
op
setaf7Xsetab0Xsmulrev onesgr0setaf7Xsetab0X smulrev two sgr0setaf7Xsetab0X smulrev sgr0setaf7Xsetab0X setaf1Xsetab2Xsmulrev foursgr0setaf7Xsetab0X smulrev five sgr0setaf7Xsetab0X smulrev sgr0setaf7Xsetab0X smulrev sgr0setaf7Xsetab0X smulreveight!!rmulsgr0opsetaf7Xsetab0Xelcup24;40Xop
|
|
@ -1 +1 @@
|
|||
enacsenacssmcupcnormclearcup24;1Xrev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0 rev rmam smamcup1;1Xsgr0
|
||||
enacsenacssmcupcnormclearcup24;1Xrev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0 rev sgr0elcup1;1X
|
|
@ -5,3 +5,24 @@ call OK addstr "\t8\n"
|
|||
call OK addstr "0123456\t8\n"
|
||||
call OK refresh
|
||||
compare addstr.chk
|
||||
#
|
||||
# Checks for PR#56224
|
||||
#
|
||||
call OK move 23 0
|
||||
# the addstr should be truncated since no scrolling
|
||||
call OK addstr "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"
|
||||
call OK refresh
|
||||
call OK clear
|
||||
call OK move 23 75
|
||||
call OK addstr "a\thello"
|
||||
call OK refresh
|
||||
compare addstr2.chk
|
||||
call OK scrollok STDSCR $TRUE
|
||||
# the addstr should be not truncated since scrolling is enabled
|
||||
call OK addstr "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()"
|
||||
call OK refresh
|
||||
call OK clear
|
||||
call OK move 23 75
|
||||
call OK addstr "a\thello"
|
||||
call OK refresh
|
||||
compare addstr3.chk
|
||||
|
|
|
@ -29,10 +29,8 @@ call OK slk_clear
|
|||
compare slk2.chk
|
||||
|
||||
# test slk_restore
|
||||
# this returns error [buggy??], ideally slk_restore must have returned OK and must have performed refresh operation
|
||||
# There should not be need of explicit refresh
|
||||
call ERR slk_restore
|
||||
call OK slk_refresh
|
||||
call OK slk_restore
|
||||
#call OK slk_refresh
|
||||
compare slk3.chk
|
||||
|
||||
# test slk_noutrefresh
|
||||
|
@ -56,7 +54,8 @@ call OK slk_refresh
|
|||
compare slk6.chk
|
||||
|
||||
# test slk_wset
|
||||
# returning ERR now - blymn 20210606
|
||||
# [buggy??] 'b' should be printed as (wcswidth(wstr) == 6) <= 8
|
||||
wchar WSTR [0x3401, "a", 0x3401, "b"]
|
||||
call OK slk_wset 3 $WSTR 1
|
||||
call OK slk_refresh
|
||||
#wchar WSTR [0x3401, "a", 0x3401, "b"]
|
||||
#call OK slk_wset 3 $WSTR 1
|
||||
#call OK slk_refresh
|
||||
|
|
Loading…
Reference in New Issue