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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201910142022.x9EKMreH016596%40masaka.moolenaar.net.

Raspunde prin e-mail lui