summaryrefslogtreecommitdiff
path: root/src/testdir/test_regexp_latin.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-05 14:00:32 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-05 14:00:32 +0100
commit72bb10df1fb3eb69bc91f5babfb8881ce098cba1 (patch)
treee2f392f6e2c6567e6686027b70021ed6a862d723 /src/testdir/test_regexp_latin.vim
parent0f68e6c07aaf62c034a242f183b93c1bb44e7f93 (diff)
downloadvim-git-72bb10df1fb3eb69bc91f5babfb8881ce098cba1.tar.gz
patch 8.2.4693: new regexp does not accept pattern "\%>0v"v8.2.4693
Problem: new regexp does not accept pattern "\%>0v". Solution: Do accept digit zero.
Diffstat (limited to 'src/testdir/test_regexp_latin.vim')
-rw-r--r--src/testdir/test_regexp_latin.vim15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim
index dfb367b5f..0b288f69f 100644
--- a/src/testdir/test_regexp_latin.vim
+++ b/src/testdir/test_regexp_latin.vim
@@ -91,16 +91,29 @@ func Test_multi_failure()
set re=0
endfunc
-func Test_column_failure()
+func Test_column_success_failure()
+ new
+ call setline(1, 'xbar')
+
set re=1
+ %s/\%>0v./A/
+ call assert_equal('Abar', getline(1))
call assert_fails('/\%v', 'E71:')
+ call assert_fails('/\%>v', 'E71:')
call assert_fails('/\%c', 'E71:')
+ call assert_fails('/\%<c', 'E71:')
call assert_fails('/\%l', 'E71:')
set re=2
+ %s/\%>0v./B/
+ call assert_equal('Bbar', getline(1))
call assert_fails('/\%v', 'E1273:')
+ call assert_fails('/\%>v', 'E1273:')
call assert_fails('/\%c', 'E1273:')
+ call assert_fails('/\%<c', 'E1273:')
call assert_fails('/\%l', 'E1273:')
+
set re=0
+ bwipe!
endfunc
func Test_recursive_addstate()