diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-01 12:02:56 +0100 |
|---|---|---|
| committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-03 20:12:20 +0100 |
| commit | d23d37b212d7b47ae1f729de5e0ea46b456ad2e5 (patch) | |
| tree | 0b80bf043842e00b5a3928b6fb4e698ddad496b7 /src/nvim/testdir/test_match.vim | |
| parent | 86593beaa40035a10a664d3147327a01f4885cb7 (diff) | |
| download | rneovim-d23d37b212d7b47ae1f729de5e0ea46b456ad2e5.tar.gz rneovim-d23d37b212d7b47ae1f729de5e0ea46b456ad2e5.tar.bz2 rneovim-d23d37b212d7b47ae1f729de5e0ea46b456ad2e5.zip | |
vim-patch:8.1.1961: more functions can be used as a method
Problem: More functions can be used as a method.
Solution: Allow more functions to be used as a method. Add a test for
mapcheck().
https://github.com/vim/vim/commit/a1449836334355b1fb00cd1bf083e7d353f6c4d7
mzeval() (if_mzscheme) is N/A.
Diffstat (limited to 'src/nvim/testdir/test_match.vim')
| -rw-r--r-- | src/nvim/testdir/test_match.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_match.vim b/src/nvim/testdir/test_match.vim index 505a052a19..70271aa32f 100644 --- a/src/nvim/testdir/test_match.vim +++ b/src/nvim/testdir/test_match.vim @@ -14,7 +14,7 @@ function Test_match() 2match MyGroup2 /FIXME/ 3match MyGroup3 /XXX/ call assert_equal(['MyGroup1', 'TODO'], matcharg(1)) - call assert_equal(['MyGroup2', 'FIXME'], matcharg(2)) + call assert_equal(['MyGroup2', 'FIXME'], 2->matcharg()) call assert_equal(['MyGroup3', 'XXX'], matcharg(3)) " --- Check that "matcharg()" returns an empty list if the argument is not 1, @@ -43,7 +43,7 @@ function Test_match() " --- Check that "matchdelete()" deletes the matches defined in the previous " --- test correctly. call matchdelete(m1) - call matchdelete(m2) + eval m2->matchdelete() call matchdelete(m3) call assert_equal([], getmatches()) @@ -55,7 +55,7 @@ function Test_match() " --- Check that "clearmatches()" clears all matches defined by ":match" and " --- "matchadd()". let m1 = matchadd("MyGroup1", "TODO") - let m2 = matchadd("MyGroup2", "FIXME", 42) + let m2 = "MyGroup2"->matchadd("FIXME", 42) let m3 = matchadd("MyGroup3", "XXX", 60, 17) match MyGroup1 /COFFEE/ 2match MyGroup2 /HUMPPA/ @@ -117,7 +117,7 @@ function Test_match() call clearmatches() call setline(1, 'abcdΣabcdef') - call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]]) + eval "MyGroup1"->matchaddpos([[1, 4, 2], [1, 9, 2]]) 1 redraw! let v1 = screenattr(1, 1) |