Hi,
On Wed, May 20, 2020 at 1:04 PM Neil H Watson <[email protected]>
wrote:
> Same but different?
>
> Failures:
> From test_terminal.vim:
> Found errors in Test_term_keycode_translation():
> Run 1:
> function RunTheTest[39]..Test_term_keycode_translation line 30:
> Expected ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>', '<F6>', '<F7>', '<F8>',
> '<F9>', '<F10>', '<F11>', '<F12>', '<Home>', '<S-Home>', '<C-Home>', '<End>',
> '<S-End>', '<C-End>', '<Insert>', '<Del>', '<Left>', '<C-Left>', '<Right>',
> '<S-Right>', '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>',
> '0123456789', '\t\t.+-*/'] but got ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>',
> '<F6>', '<F7>', '<F8>', '<F9>', '<F10>', '<F11>', '<F12>', '<Home>',
> '<S-Home>', '<C-Home>', '<End>', '<S-End>', '<C-End>', '<Insert>', '<Del>',
> '', '\t\t.+-*/<Left>', '<C-Left>', '<Right>', '<S-Right>', '<C-Right>',
> '<Up>', '<S-Up>', '<Down>', '<S-Down>', '45678012']
> Run 2:
> function RunTheTest[39]..Test_term_keycode_translation line 30:
> Expected ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>', '<F6>', '<F7>', '<F8>',
> '<F9>', '<F10>', '<F11>', '<F12>', '<Home>', '<S-Home>', '<C-Home>', '<End>',
> '<S-End>', '<C-End>', '<Insert>', '<Del>', '<Left>', '<C-Left>', '<Right>',
> '<S-Right>', '<C-Right>', '<Up>', '<S-Up>', '<Down>', '<S-Down>',
> '0123456789', '\t\t.+-*/'] but got ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>',
> '<F6>', '<F7>', '<F8>', '<F9>', '<F10>', '<F11>', '<F12>', '<Home>',
> '<S-Home>', '<C-Home>', '<End>', '<S-End>', '<C-End>', '<Insert>', '<Del>',
> '', '\t\t.+-*/<Left>', '<C-Left>', '<Right>', '<S-Right>', '<C-Right>',
> '<Up>', '<S-Up>', '<Down>', '<S-Down>', '45678012']
> Flaky test failed too often, giving up
> Screen size too small! Tests require at least 24 lines with 80
> characters, got 50 lines with 63 characters
>
>
>
Can you try replacing the Test_term_keycode_translation() function with the
one below
and rerun the test? This removes the test for the <Home> and <Ins> keys.
Thanks,
Yegappan
===================================================================
func Test_term_keycode_translation()
CheckRunVimInTerminal
let buf = RunVimInTerminal('', {})
call term_sendkeys(buf, ":set nocompatible\<CR>")
let keys = ["\<F1>", "\<F2>", "\<F3>", "\<F4>", "\<F5>", "\<F6>", "\<F7>",
\ "\<F8>", "\<F9>", "\<F10>", "\<F11>", "\<F12>", "\<Home>",
\ "\<S-Home>", "\<C-Home>", "\<End>", "\<S-End>", "\<C-End>",
\ "\<Ins>", "\<Del>", "\<Left>", "\<S-Left>", "\<C-Left>", "\<Right>",
\ "\<S-Right>", "\<C-Right>", "\<Up>", "\<S-Up>", "\<Down>",
\ "\<S-Down>"]
let output = ['<F1>', '<F2>', '<F3>', '<F4>', '<F5>', '<F6>', '<F7>',
\ '<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', ".+-*/", "two"]
call term_sendkeys(buf, "i")
for k in keys
call term_sendkeys(buf, "\<C-K>" .. k .. "\<CR>")
endfor
call term_sendkeys(buf, "\<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_wait(buf)
call feedkeys("A\<CR>one\<C-W>.two\<C-W>\<C-\>\<C-N>", 'xt')
call term_sendkeys(buf, ":write Xkeycodes\<CR>")
call term_wait(buf)
call StopVimInTerminal(buf)
call assert_equal(output, readfile('Xkeycodes'))
call delete('Xkeycodes')
endfunc
--
--
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/CAAW7x7kG-bTO6900Hj39S7KCOABGtBrVaVqnidrBe5OKtUnTtw%40mail.gmail.com.