From d23d37b212d7b47ae1f729de5e0ea46b456ad2e5 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Wed, 1 Sep 2021 12:02:56 +0100 Subject: 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. --- src/nvim/testdir/test_match.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/testdir/test_match.vim') 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) -- cgit