summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-12 13:25:44 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-12 13:25:44 +0200
commit1a4cbb19ded7ad6cb161f2797e0414032d1f9b5c (patch)
tree7dd1994da446c47206d355adb4cb2581ea64ca75
parentec66c41d84e574baf8009dbc0bd088d2bc5b2421 (diff)
downloadvim-git-1a4cbb19ded7ad6cb161f2797e0414032d1f9b5c.tar.gz
patch 8.1.2137: parsing the termresponse is not testedv8.1.2137
Problem: Parsing the termresponse is not tested. Solution: Add a first test. (related to #5042)
-rw-r--r--src/testdir/test_termcodes.vim24
-rw-r--r--src/version.c2
2 files changed, 23 insertions, 3 deletions
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 617472317..22e7a04de 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index 46bd1b19c..a6a139838 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2137,
+/**/
2136,
/**/
2135,