Mercurial > vim
comparison src/testdir/test_marks.vim @ 15406:63b02fcf1361 v8.1.0711
patch 8.1.0711: test files still use function!
commit https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 9 23:01:02 2019 +0100
patch 8.1.0711: test files still use function!
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 09 Jan 2019 23:15:05 +0100 |
parents | f7e80dbb4f00 |
children | 2dcaa860e3fc |
comparison
equal
deleted
inserted
replaced
15405:3a8785d45112 | 15406:63b02fcf1361 |
---|---|
1 | 1 |
2 " Test that a deleted mark is restored after delete-undo-redo-undo. | 2 " Test that a deleted mark is restored after delete-undo-redo-undo. |
3 function! Test_Restore_DelMark() | 3 func Test_Restore_DelMark() |
4 enew! | 4 enew! |
5 call append(0, [" textline A", " textline B", " textline C"]) | 5 call append(0, [" textline A", " textline B", " textline C"]) |
6 normal! 2gg | 6 normal! 2gg |
7 set nocp viminfo+=nviminfo | 7 set nocp viminfo+=nviminfo |
8 exe "normal! i\<C-G>u\<Esc>" | 8 exe "normal! i\<C-G>u\<Esc>" |
9 exe "normal! maddu\<C-R>u" | 9 exe "normal! maddu\<C-R>u" |
10 let pos = getpos("'a") | 10 let pos = getpos("'a") |
11 call assert_equal(2, pos[1]) | 11 call assert_equal(2, pos[1]) |
12 call assert_equal(1, pos[2]) | 12 call assert_equal(1, pos[2]) |
13 enew! | 13 enew! |
14 endfunction | 14 endfunc |
15 | 15 |
16 " Test that CTRL-A and CTRL-X updates last changed mark '[, ']. | 16 " Test that CTRL-A and CTRL-X updates last changed mark '[, ']. |
17 function! Test_Incr_Marks() | 17 func Test_Incr_Marks() |
18 enew! | 18 enew! |
19 call append(0, ["123 123 123", "123 123 123", "123 123 123"]) | 19 call append(0, ["123 123 123", "123 123 123", "123 123 123"]) |
20 normal! gg | 20 normal! gg |
21 execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX" | 21 execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX" |
22 call assert_equal("AAA 123 123", getline(1)) | 22 call assert_equal("AAA 123 123", getline(1)) |
23 call assert_equal("123 XXXXXXX", getline(2)) | 23 call assert_equal("123 XXXXXXX", getline(2)) |
24 call assert_equal("XXX 123 123", getline(3)) | 24 call assert_equal("XXX 123 123", getline(3)) |
25 enew! | 25 enew! |
26 endfunction | 26 endfunc |
27 | 27 |
28 func Test_setpos() | 28 func Test_setpos() |
29 new one | 29 new one |
30 let onebuf = bufnr('%') | 30 let onebuf = bufnr('%') |
31 let onewin = win_getid() | 31 let onewin = win_getid() |