Mercurial > vim
comparison src/testdir/test_vim9_cmd.vim @ 22812:1ef3b04875ff v8.2.1954
patch 8.2.1954: Vim9: not all command modifiers are tested
Commit: https://github.com/vim/vim/commit/f65b35b4465d3622128bd82bd3775f833542eb1f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 4 18:02:44 2020 +0100
patch 8.2.1954: Vim9: not all command modifiers are tested
Problem: Vim9: not all command modifiers are tested.
Solution: Add tests for "keep" modifiers. Fix that marks are lost even
though ":lockmarks" is used.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 Nov 2020 18:15:03 +0100 |
parents | 44317eb799d7 |
children | bb1b21a2aae3 |
comparison
equal
deleted
inserted
replaced
22811:f2e4940ef271 | 22812:1ef3b04875ff |
---|---|
437 DoTest(false, false, true) | 437 DoTest(false, false, true) |
438 DoTest(true, false, false) | 438 DoTest(true, false, false) |
439 DoTest(false, true, true) | 439 DoTest(false, true, true) |
440 DoTest(true, true, true) | 440 DoTest(true, true, true) |
441 set cpo&vim | 441 set cpo&vim |
442 | |
443 new | |
444 setline(1, ['one', 'two', 'three', 'four']) | |
445 assert_equal(4, line("$")) | |
446 normal 1Gma | |
447 normal 2Gmb | |
448 normal 3Gmc | |
449 lockmarks :1,2!wc | |
450 # line is deleted, marks don't move | |
451 assert_equal(3, line("$")) | |
452 assert_equal('four', getline(3)) | |
453 assert_equal(1, line("'a")) | |
454 assert_equal(2, line("'b")) | |
455 assert_equal(3, line("'c")) | |
456 quit! | |
442 endif | 457 endif |
443 | 458 |
444 # TODO | 459 edit Xone |
445 # lockmarks | 460 edit Xtwo |
446 # keepalt | 461 assert_equal('Xone', expand('#')) |
447 # keeppatterns | 462 keepalt edit Xthree |
448 # keepjumps | 463 assert_equal('Xone', expand('#')) |
464 | |
465 normal /a*b* | |
466 assert_equal('a*b*', histget("search")) | |
467 keeppatterns normal /c*d* | |
468 assert_equal('a*b*', histget("search")) | |
469 | |
470 new | |
471 setline(1, range(10)) | |
472 :10 | |
473 normal gg | |
474 assert_equal(10, getpos("''")[1]) | |
475 keepjumps normal 5G | |
476 assert_equal(10, getpos("''")[1]) | |
477 quit! | |
449 enddef | 478 enddef |
450 | 479 |
451 def Test_command_modifier_other() | 480 def Test_command_modifier_other() |
452 # TODO | 481 # TODO |
453 # hide | 482 # hide |