forked from aniani/vim
patch 8.1.2150: no test for 'ttymouse' set from xterm version response
Problem: No test for 'ttymouse' set from xterm version response. Solution: Test the three possible values.
This commit is contained in:
parent
e3a22cb1ba
commit
03b00476ee
@ -885,13 +885,12 @@ endfunc
|
|||||||
" This checks the libvterm version response.
|
" This checks the libvterm version response.
|
||||||
" This must be after other tests, because it has side effects to xterm
|
" This must be after other tests, because it has side effects to xterm
|
||||||
" properties.
|
" properties.
|
||||||
" TODO: check other terminals response
|
|
||||||
func Test_xx02_libvterm_response()
|
func Test_xx02_libvterm_response()
|
||||||
" Termresponse is only parsed when t_RV is not empty.
|
" Termresponse is only parsed when t_RV is not empty.
|
||||||
set t_RV=x
|
set t_RV=x
|
||||||
|
|
||||||
set ttymouse=xterm
|
set ttymouse=xterm
|
||||||
call test_option_not_set('ttymouse')
|
call test_option_not_set('ttymouse')
|
||||||
|
|
||||||
let seq = "\<Esc>[>0;100;0c"
|
let seq = "\<Esc>[>0;100;0c"
|
||||||
call feedkeys(seq, 'Lx!')
|
call feedkeys(seq, 'Lx!')
|
||||||
call assert_equal(seq, v:termresponse)
|
call assert_equal(seq, v:termresponse)
|
||||||
@ -900,6 +899,42 @@ func Test_xx02_libvterm_response()
|
|||||||
set t_RV=
|
set t_RV=
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" This checks the xterm version response.
|
||||||
|
" This must be after other tests, because it has side effects to xterm
|
||||||
|
" properties.
|
||||||
|
func Test_xx03_xterm_response()
|
||||||
|
" Termresponse is only parsed when t_RV is not empty.
|
||||||
|
set t_RV=x
|
||||||
|
|
||||||
|
" xterm < 95: "xterm" (actually unmodified)
|
||||||
|
set ttymouse=xterm
|
||||||
|
call test_option_not_set('ttymouse')
|
||||||
|
let seq = "\<Esc>[>0;94;0c"
|
||||||
|
call feedkeys(seq, 'Lx!')
|
||||||
|
call assert_equal(seq, v:termresponse)
|
||||||
|
call assert_equal('xterm', &ttymouse)
|
||||||
|
|
||||||
|
" xterm >= 95 < 277 "xterm2"
|
||||||
|
set ttymouse=xterm
|
||||||
|
call test_option_not_set('ttymouse')
|
||||||
|
let seq = "\<Esc>[>0;267;0c"
|
||||||
|
call feedkeys(seq, 'Lx!')
|
||||||
|
call assert_equal(seq, v:termresponse)
|
||||||
|
call assert_equal('xterm2', &ttymouse)
|
||||||
|
|
||||||
|
" xterm >= 277: "sgr"
|
||||||
|
set ttymouse=xterm
|
||||||
|
call test_option_not_set('ttymouse')
|
||||||
|
let seq = "\<Esc>[>0;277;0c"
|
||||||
|
call feedkeys(seq, 'Lx!')
|
||||||
|
call assert_equal(seq, v:termresponse)
|
||||||
|
call assert_equal('sgr', &ttymouse)
|
||||||
|
|
||||||
|
set t_RV=
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" TODO: check other terminals response
|
||||||
|
|
||||||
func Test_get_termcode()
|
func Test_get_termcode()
|
||||||
try
|
try
|
||||||
let k1 = &t_k1
|
let k1 = &t_k1
|
||||||
|
@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2150,
|
||||||
/**/
|
/**/
|
||||||
2149,
|
2149,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user