vtest	"trivial run of vinylhist in curses mode"

server s1 {
	rxreq
	txresp -bodylen 32
} -start

vinyl v1 -vcl+backend {} -start

process p1 -dump {vinylhist -n ${v1_name}} -start
process p2 -dump {vinylhist -n ${v1_name} -P b:BereqAcct::5:-1:1} -start
process p3 -dump {VINYL_DEFAULT_N="${v1_name}" vinylhist -P BerespBodytime -B 2} -start

process p1 -expect-text 24 0 {1e2}
process p2 -expect-text 24 0 {1e-1}
process p3 -expect-text 24 0 {1e2}

delay 1

client c1 {
	txreq
	rxresp
} -run

vinyl v1 -vsl_catchup

process p1 -expect-text 22 0 {#}
process p2 -expect-text 22 80 {#}

client c1 {
	txreq
	rxresp
} -run

vinyl v1 -vsl_catchup

process p1 -expect-text 22 0 { |}

process p1 -expect-text 3 1 {20_}

process p1 -screen_dump

process p1 -winsz 23 80 -need-bytes +10

process p1 -write {0>+-<} -need-bytes +10

process p3 -write {0++++++++++>+-<x} -need-bytes +10

process p1 -expect-text 2 1 {20_}

process p1 -writehex 0c -need-bytes +10

process p1 -screen_dump -write {q} -wait
process p2 -screen_dump -kill HUP -wait
process p3 -screen_dump -kill TERM -wait
