diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2014-09-05 20:57:41 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2014-09-05 20:57:41 -0400 |
| commit | 3f5482d3251b3bbdc7c4df8a8e64eb3af7e5922c (patch) | |
| tree | c3703170cc71c81da50b25fd0a8ff24af387d594 /src/nvim/testdir | |
| parent | d66cd61b79d6d592436c4552dbdddb904dd1c22e (diff) | |
| parent | d860ba45e25231ae54c6fd12ecd00dc936780184 (diff) | |
| download | rneovim-3f5482d3251b3bbdc7c4df8a8e64eb3af7e5922c.tar.gz rneovim-3f5482d3251b3bbdc7c4df8a8e64eb3af7e5922c.tar.bz2 rneovim-3f5482d3251b3bbdc7c4df8a8e64eb3af7e5922c.zip | |
Merge pull request #1107 from fmoralesc/matchaddpos
Add matchaddpos()-related vim patches. [vim-patch: 7.4.330, 7.4.334, 7.4.343, 7.4.344, 7.4.362]
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test63.in | 25 | ||||
| -rw-r--r-- | src/nvim/testdir/test63.ok | 3 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/nvim/testdir/test63.in b/src/nvim/testdir/test63.in index 74339c3e35..ea66ee6dea 100644 --- a/src/nvim/testdir/test63.in +++ b/src/nvim/testdir/test63.in @@ -1,5 +1,5 @@ Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()", -"matchadd()", "matcharg()", "matchdelete()", and "setmatches()". +"matchadd()", "matchaddpos()", "matcharg()", "matchdelete()", and "setmatches()". STARTTEST :so small.vim @@ -147,9 +147,26 @@ STARTTEST :unlet rf1 :unlet rf2 :unlet rf3 -:highlight clear MyGroup1 -:highlight clear MyGroup2 -:highlight clear MyGroup3 +:" --- Check that "matchaddpos()" positions matches correctly +:let @r .= "*** Test 11:\n" +:set nolazyredraw +:call setline(1, 'abcdefghijklmnopq') +:call matchaddpos("MyGroup1", [[1, 5], [1, 8, 3]], 10, 3) +:1 +:redraw! +:let v1 = screenattr(1, 1) +:let v5 = screenattr(1, 5) +:let v6 = screenattr(1, 6) +:let v8 = screenattr(1, 8) +:let v10 = screenattr(1, 10) +:let v11 = screenattr(1, 11) +:let @r .= string(getmatches())."\n" +:if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1 +: let @r .= "OK\n" +:else +: let @r .= "FAILED\n" +:endif +:call clearmatches() G"rp :/^Results/,$wq! test.out ENDTEST diff --git a/src/nvim/testdir/test63.ok b/src/nvim/testdir/test63.ok index 14973985eb..f804b693ac 100644 --- a/src/nvim/testdir/test63.ok +++ b/src/nvim/testdir/test63.ok @@ -9,3 +9,6 @@ Results of test63: *** Test 8: OK *** Test 9: OK *** Test 10: OK +*** Test 11: +[{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}] +OK |