Mercurial > vim
comparison src/testdir/test_marks.vim @ 10068:c577c6a2e88b v7.4.2305
commit https://github.com/vim/vim/commit/19a1669ffc796e30a83c5600f82f12ebf63a2261
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 1 22:19:47 2016 +0200
patch 7.4.2305
Problem: Marks, writefile and nested function tests are old style.
Solution: Turn them into new style tests. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 01 Sep 2016 22:30:08 +0200 |
parents | |
children | 44e9340dc604 |
comparison
equal
deleted
inserted
replaced
10067:4d790349eb7d | 10068:c577c6a2e88b |
---|---|
1 | |
2 " Test that a deleted mark is restored after delete-undo-redo-undo. | |
3 function! Test_Restore_DelMark() | |
4 enew! | |
5 call append(0, [" textline A", " textline B", " textline C"]) | |
6 normal! 2gg | |
7 set nocp viminfo+=nviminfo | |
8 exe "normal! i\<C-G>u\<Esc>" | |
9 exe "normal! maddu\<C-R>u" | |
10 let pos = getpos("'a") | |
11 call assert_equal(2, pos[1]) | |
12 call assert_equal(1, pos[2]) | |
13 enew! | |
14 endfunction | |
15 | |
16 " Test that CTRL-A and CTRL-X updates last changed mark '[, ']. | |
17 function! Test_Incr_Marks() | |
18 enew! | |
19 call append(0, ["123 123 123", "123 123 123", "123 123 123"]) | |
20 normal! gg | |
21 execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX" | |
22 call assert_equal("AAA 123 123", getline(1)) | |
23 call assert_equal("123 XXXXXXX", getline(2)) | |
24 call assert_equal("XXX 123 123", getline(3)) | |
25 enew! | |
26 endfunction |