comparison src/testdir/test_vim9_builtin.vim @ 24699:b19c8150ee9d v8.2.2888

patch 8.2.2888: Vim9: "k" command recognized in Vim9 script Commit: https://github.com/vim/vim/commit/7d840e9ac7529ec144e103d2a13abce8aa8c1ff1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 26 21:10:11 2021 +0200 patch 8.2.2888: Vim9: "k" command recognized in Vim9 script Problem: Vim9: "k" command recognized in Vim9 script. Solution: Do not recognize "k" or "s" and "d" with flags.
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 May 2021 21:15:03 +0200
parents 13efbfc53054
children 0bc60e26a2b5
comparison
equal deleted inserted replaced
24698:5eef2f4937e3 24699:b19c8150ee9d
550 550
551 def Test_filter_missing_argument() 551 def Test_filter_missing_argument()
552 var dict = {aa: [1], ab: [2], ac: [3], de: [4]} 552 var dict = {aa: [1], ab: [2], ac: [3], de: [4]}
553 var res = dict->filter((k, _) => k =~ 'a' && k !~ 'b') 553 var res = dict->filter((k, _) => k =~ 'a' && k !~ 'b')
554 res->assert_equal({aa: [1], ac: [3]}) 554 res->assert_equal({aa: [1], ac: [3]})
555 enddef
556
557 def Test_fullcommand()
558 assert_equal('next', fullcommand('n'))
559 assert_equal('noremap', fullcommand('no'))
560 assert_equal('noremap', fullcommand('nor'))
561 assert_equal('normal', fullcommand('norm'))
562
563 assert_equal('', fullcommand('k'))
564 assert_equal('keepmarks', fullcommand('ke'))
565 assert_equal('keepmarks', fullcommand('kee'))
566 assert_equal('keepmarks', fullcommand('keep'))
567 assert_equal('keepjumps', fullcommand('keepj'))
568
569 assert_equal('dlist', fullcommand('dl'))
570 assert_equal('', fullcommand('dp'))
571 assert_equal('delete', fullcommand('del'))
572 assert_equal('', fullcommand('dell'))
573 assert_equal('', fullcommand('delp'))
574
575 assert_equal('srewind', fullcommand('sre'))
576 assert_equal('scriptnames', fullcommand('scr'))
577 assert_equal('', fullcommand('scg'))
555 enddef 578 enddef
556 579
557 def Test_garbagecollect() 580 def Test_garbagecollect()
558 garbagecollect(true) 581 garbagecollect(true)
559 enddef 582 enddef