comparison src/testdir/test_searchpos.vim @ 17994:0dcc2ee838dd v8.1.1993

patch 8.1.1993: more functions can be used as methods Commit: https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 6 21:34:30 2019 +0200 patch 8.1.1993: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make various functions usable as a method.
author Bram Moolenaar <Bram@vim.org>
date Fri, 06 Sep 2019 21:45:04 +0200
parents 9fc996244059
children 08940efa6b4e
comparison
equal deleted inserted replaced
17993:55bdc69c5e57 17994:0dcc2ee838dd
5 0put ='1a3' 5 0put ='1a3'
6 1put ='123xyz' 6 1put ='123xyz'
7 call cursor(1, 1) 7 call cursor(1, 1)
8 call assert_equal([1, 1, 2], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW')) 8 call assert_equal([1, 1, 2], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW'))
9 call cursor(1, 2) 9 call cursor(1, 2)
10 call assert_equal([2, 1, 1], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW')) 10 call assert_equal([2, 1, 1], '\%(\([a-z]\)\|\_.\)\{-}xyz'->searchpos('pcW'))
11 set cpo-=c 11 set cpo-=c
12 call cursor(1, 2) 12 call cursor(1, 2)
13 call assert_equal([1, 2, 2], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW')) 13 call assert_equal([1, 2, 2], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW'))
14 call cursor(1, 3) 14 call cursor(1, 3)
15 call assert_equal([1, 3, 1], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW')) 15 call assert_equal([1, 3, 1], searchpos('\%(\([a-z]\)\|\_.\)\{-}xyz', 'pcW'))