Patch 8.1.2150

10 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 14, 2019, 4:23:00 PM10/14/19
to vim...@googlegroups.com

Patch 8.1.2150
Problem: No test for 'ttymouse' set from xterm version response.
Solution: Test the three possible values.
Files: src/testdir/test_termcodes.vim


*** ../vim-8.1.2149/src/testdir/test_termcodes.vim 2019-10-13 21:01:31.058733704 +0200
--- src/testdir/test_termcodes.vim 2019-10-14 22:17:36.305857586 +0200
***************
*** 885,897 ****
" This checks the libvterm version response.
" This must be after other tests, because it has side effects to xterm
" properties.
- " TODO: check other terminals response
func Test_xx02_libvterm_response()
" Termresponse is only parsed when t_RV is not empty.
set t_RV=x
set ttymouse=xterm
call test_option_not_set('ttymouse')
-
let seq = "\<Esc>[>0;100;0c"
call feedkeys(seq, 'Lx!')
call assert_equal(seq, v:termresponse)
--- 885,896 ----
" This checks the libvterm version response.
" This must be after other tests, because it has side effects to xterm
" properties.
func Test_xx02_libvterm_response()
" Termresponse is only parsed when t_RV is not empty.
set t_RV=x
+
set ttymouse=xterm
call test_option_not_set('ttymouse')
let seq = "\<Esc>[>0;100;0c"
call feedkeys(seq, 'Lx!')
call assert_equal(seq, v:termresponse)
***************
*** 900,905 ****
--- 899,940 ----
set t_RV=
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()
try
let k1 = &t_k1
*** ../vim-8.1.2149/src/version.c 2019-10-14 22:01:54.004832028 +0200
--- src/version.c 2019-10-14 22:19:47.117386979 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 2150,
/**/

--
Females are strictly forbidden to appear unshaven in public.
[real standing law in New Mexico, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages