Mercurial > vim
comparison src/testdir/test_termcodes.vim @ 20313:244eb8d8d100 v8.2.0712
patch 8.2.0712: various code not fully tested
Commit: https://github.com/vim/vim/commit/0ff5dedf0f69e56320199db7a2aad46be2a1f9b7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 7 18:43:44 2020 +0200
patch 8.2.0712: various code not fully tested
Problem: Various code not fully tested.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6049)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 May 2020 18:45:04 +0200 |
parents | 0927df746554 |
children | 5ffe112b1afd |
comparison
equal
deleted
inserted
replaced
20312:0742d56da9b2 | 20313:244eb8d8d100 |
---|---|
1369 call assert_equal("\"\<Esc>[27;5;89~", @:) | 1369 call assert_equal("\"\<Esc>[27;5;89~", @:) |
1370 | 1370 |
1371 set timeoutlen& | 1371 set timeoutlen& |
1372 endfunc | 1372 endfunc |
1373 | 1373 |
1374 " Test for translation of special key codes (<xF1>, <xF2>, etc.) | |
1375 func Test_Keycode_Tranlsation() | |
1376 let keycodes = [ | |
1377 \ ["<xUp>", "<Up>"], | |
1378 \ ["<xDown>", "<Down>"], | |
1379 \ ["<xLeft>", "<Left>"], | |
1380 \ ["<xRight>", "<Right>"], | |
1381 \ ["<xHome>", "<Home>"], | |
1382 \ ["<xEnd>", "<End>"], | |
1383 \ ["<zHome>", "<Home>"], | |
1384 \ ["<zEnd>", "<End>"], | |
1385 \ ["<xF1>", "<F1>"], | |
1386 \ ["<xF2>", "<F2>"], | |
1387 \ ["<xF3>", "<F3>"], | |
1388 \ ["<xF4>", "<F4>"], | |
1389 \ ["<S-xF1>", "<S-F1>"], | |
1390 \ ["<S-xF2>", "<S-F2>"], | |
1391 \ ["<S-xF3>", "<S-F3>"], | |
1392 \ ["<S-xF4>", "<S-F4>"]] | |
1393 for [k1, k2] in keycodes | |
1394 exe "nnoremap " .. k1 .. " 2wx" | |
1395 call assert_true(maparg(k1, 'n', 0, 1).lhs == k2) | |
1396 exe "nunmap " .. k1 | |
1397 endfor | |
1398 endfunc | |
1399 | |
1374 " vim: shiftwidth=2 sts=2 expandtab | 1400 " vim: shiftwidth=2 sts=2 expandtab |