aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-17 10:38:40 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-17 11:04:55 +0800
commitccdbab7810bd40a44a0a502d478b0d06073388e9 (patch)
treeffc8f476b62855ecff99131381b5195e61544758 /test/old/testdir
parentdce615bc425795ad65f96ed1879ba37ff6a030d8 (diff)
downloadrneovim-ccdbab7810bd40a44a0a502d478b0d06073388e9.tar.gz
rneovim-ccdbab7810bd40a44a0a502d478b0d06073388e9.tar.bz2
rneovim-ccdbab7810bd40a44a0a502d478b0d06073388e9.zip
vim-patch:9.0.0407: matchstr() does match column offset
Problem: matchstr() does match column offset. (Yasuhiro Matsumoto) Solution: Accept line number zero. (closes vim/vim#10938) https://github.com/vim/vim/commit/75a115e8d632e96b4f45dc5145ba261876a83dcf Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_regexp_latin.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/old/testdir/test_regexp_latin.vim b/test/old/testdir/test_regexp_latin.vim
index de73ae633f..754fa8c868 100644
--- a/test/old/testdir/test_regexp_latin.vim
+++ b/test/old/testdir/test_regexp_latin.vim
@@ -30,11 +30,13 @@ endfunc
func Test_equivalence_re1()
set re=1
call s:equivalence_test()
+ set re=0
endfunc
func Test_equivalence_re2()
set re=2
call s:equivalence_test()
+ set re=0
endfunc
func Test_recursive_substitute()
@@ -67,6 +69,7 @@ func Test_eow_with_optional()
let actual = matchlist('abc def', '\(abc\>\)\?\s*\(def\)')
call assert_equal(expected, actual)
endfor
+ set re=0
endfunc
func Test_backref()
@@ -1147,4 +1150,14 @@ endfunc
" prop_type_delete('name')
" enddef
+func Test_compare_column_matchstr()
+ enew
+ set re=1
+ call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
+ set re=2
+ call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
+ set re=0
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab