Patch 8.2.0805

5 views
Skip to first unread message

Bram Moolenaar

unread,
May 21, 2020, 2:40:07 PM5/21/20
to vim...@googlegroups.com

Patch 8.2.0805
Problem: Terminal key codes test fails on some systems.
Solution: Skip keypad 3 and 9. (Yegappan Lakshmanan, closes #6070)
Files: src/testdir/test_terminal.vim


*** ../vim-8.2.0804/src/testdir/test_terminal.vim 2020-05-18 19:46:00.074602945 +0200
--- src/testdir/test_terminal.vim 2020-05-21 20:36:56.528125201 +0200
***************
*** 2683,2704 ****
\ '<F8>', '<F9>', '<F10>', '<F11>', '<F12>', '<Home>', '<S-Home>',
\ '<C-Home>', '<End>', '<S-End>', '<C-End>', '<Insert>', '<Del>',
\ '<Left>', '<S-Left>', '<C-Left>', '<Right>', '<S-Right>',
! \ '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>',
! \ '0123456789', "\t\t.+-*/"]

! for k in keys
! call term_sendkeys(buf, "i\<C-K>" .. k .. "\<CR>\<C-\>\<C-N>")
endfor
- call term_sendkeys(buf, "i\<K0>\<K1>\<K2>\<K3>\<K4>\<K5>\<K6>\<K7>")
- call term_sendkeys(buf, "\<K8>\<K9>\<kEnter>\<kPoint>\<kPlus>")
- call term_sendkeys(buf, "\<kMinus>\<kMultiply>\<kDivide>\<C-\>\<C-N>")
- call term_sendkeys(buf, "\<Home>\<Ins>\<Tab>\<S-Tab>\<C-\>\<C-N>")

! call term_sendkeys(buf, ":write Xkeycodes\<CR>")
call term_wait(buf)
call StopVimInTerminal(buf)
- call assert_equal(output, readfile('Xkeycodes'))
- call delete('Xkeycodes')
endfunc

" Test for using the mouse in a terminal
--- 2683,2727 ----
\ '<F8>', '<F9>', '<F10>', '<F11>', '<F12>', '<Home>', '<S-Home>',
\ '<C-Home>', '<End>', '<S-End>', '<C-End>', '<Insert>', '<Del>',
\ '<Left>', '<S-Left>', '<C-Left>', '<Right>', '<S-Right>',
! \ '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>']

! call term_sendkeys(buf, "i")
! for i in range(len(keys))
! call term_sendkeys(buf, "\<C-U>\<C-K>" .. keys[i])
! call term_wait(buf)
! call assert_equal(output[i], term_getline(buf, 1))
endfor

! "call term_sendkeys(buf, "\<K0>\<K1>\<K2>\<K3>\<K4>\<K5>\<K6>\<K7>\<K8>\<K9>")
! "call term_sendkeys(buf, "\<kEnter>\<kPoint>\<kPlus>")
! "call term_sendkeys(buf, "\<kMinus>\<kMultiply>\<kDivide>")
! "call term_sendkeys(buf, "\<Esc>")
! "call term_sendkeys(buf, "\<Home>\<Ins>\<Tab>\<S-Tab>")
! "call term_sendkeys(buf, "\<Esc>")
!
! "call term_sendkeys(buf, ":write Xkeycodes\<CR>")
!
! let keypad_keys = ["\<k0>", "\<k1>", "\<k2>", "\<k3>", "\<k4>", "\<k5>",
! \ "\<k6>", "\<k7>", "\<k8>", "\<k9>", "\<kPoint>", "\<kPlus>",
! \ "\<kMinus>", "\<kMultiply>", "\<kDivide>"]
! let keypad_output = ['0', '1', '2', '3', '4', '5',
! \ '6', '7', '8', '9', '.', '+',
! \ '-', '*', '/']
! for i in range(len(keypad_keys))
! " TODO: Mysteriously keypad 3 and 9 do not work on some systems.
! if keypad_output[i] == '3' || keypad_output[i] == '9'
! continue
! endif
! call term_sendkeys(buf, "\<C-U>" .. keypad_keys[i])
! call term_wait(buf)
! call assert_equal(keypad_output[i], term_getline(buf, 1))
! endfor
!
! call feedkeys("\<C-U>\<kEnter>\<BS>one\<C-W>.two", 'xt')
call term_wait(buf)
+ call assert_equal('two', term_getline(buf, 1))
+
call StopVimInTerminal(buf)
endfunc

" Test for using the mouse in a terminal
*** ../vim-8.2.0804/src/version.c 2020-05-21 20:10:00.289336748 +0200
--- src/version.c 2020-05-21 20:28:48.085294840 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 805,
/**/

--
hundred-and-one symptoms of being an internet addict:
150. You find yourself counting emoticons to get to sleep.

/// 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 ///

Elimar Riesebieter

unread,
May 22, 2020, 3:32:31 AM5/22/20
to vim...@googlegroups.com
* Bram Moolenaar <Br...@moolenaar.net> [2020-05-21 20:39 +0200]:

>
> Patch 8.2.0805
> Problem: Terminal key codes test fails on some systems.
> Solution: Skip keypad 3 and 9. (Yegappan Lakshmanan, closes #6070)
> Files: src/testdir/test_terminal.vim
>

Thanks,

test_terminal.vim runs fine now.

Elimar
--
Learned men are the cisterns of knowledge,
not the fountainheads ;-)
Reply all
Reply to author
Forward
0 new messages