]> granicus.if.org Git - vim/commitdiff
patch 8.1.2137: parsing the termresponse is not tested v8.1.2137
authorBram Moolenaar <Bram@vim.org>
Sat, 12 Oct 2019 11:25:44 +0000 (13:25 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 12 Oct 2019 11:25:44 +0000 (13:25 +0200)
Problem:    Parsing the termresponse is not tested.
Solution:   Add a first test. (related to #5042)

src/testdir/test_termcodes.vim
src/version.c

index 6174723173d05b8b10d7af3236813bba4dc9d749..22e7a04de14004557f57c071a7158d5dcd4fb78f 100644 (file)
@@ -779,9 +779,9 @@ func Test_term_rgb_response()
 endfunc
 
 " This only checks if the sequence is recognized.
-" This must be last, because it has side effects to xterm properties.
-" TODO: check that the values were parsed properly
-func Test_xx_term_style_response()
+" This must be after other tests, because it has side effects to xterm
+" properties.
+func Test_xx01_term_style_response()
   " Termresponse is only parsed when t_RV is not empty.
   set t_RV=x
 
@@ -797,6 +797,24 @@ func Test_xx_term_style_response()
   set t_RV=
 endfunc
 
+" 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)
+  call assert_equal('sgr', &ttymouse)
+
+  set t_RV=
+endfunc
+
 func Test_get_termcode()
   try
     let k1 = &t_k1
index 46bd1b19c69666aff808456250fa59a5363a0982..a6a1398386b0adaf2a1b72ccfe8a986faa9fe77f 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2137,
 /**/
     2136,
 /**/