From 79002cf438093aedb3ebea72e4e597217bfd4766 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 17 Jul 2024 11:33:45 +0800 Subject: [PATCH] vim-patch:8.2.2656: some command line arguments and regexp errors not tested (#29761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Some command line arguments and regexp errors not tested. Solution: Add a few test cases. (Dominique Pellé, closes vim/vim#8013) https://github.com/vim/vim/commit/a2b3e7dc9201fb3d8782c6b4ab53862160e254da Co-authored-by: Bram Moolenaar --- test/old/testdir/test_regexp_latin.vim | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/old/testdir/test_regexp_latin.vim b/test/old/testdir/test_regexp_latin.vim index ac46d0b17b..9857e1f886 100644 --- a/test/old/testdir/test_regexp_latin.vim +++ b/test/old/testdir/test_regexp_latin.vim @@ -970,8 +970,17 @@ func Test_regexp_error() call assert_fails("call matchlist('x x', '\\%#=1 \\ze*')", 'E888:') call assert_fails("call matchlist('x x', '\\%#=2 \\zs*')", 'E888:') call assert_fails("call matchlist('x x', '\\%#=2 \\ze*')", 'E888:') - call assert_fails('exe "normal /\\%#=1\\%[x\\%[x]]\"', 'E369:') call assert_fails("call matchstr('abcd', '\\%o841\\%o142')", 'E678:') + call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647c')", 'E951:') + call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647l')", 'E951:') + call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647v')", 'E951:') + call assert_fails('exe "normal /\\%#=1\\%[x\\%[x]]\"', 'E369:') + call assert_fails('exe "normal /\\%#=2\\%2147483647l\"', 'E951:') + call assert_fails('exe "normal /\\%#=2\\%2147483647c\"', 'E951:') + call assert_fails('exe "normal /\\%#=2\\%102261126v\"', 'E951:') + call assert_fails('exe "normal /\\%#=2\\%2147483646l\"', 'E486:') + call assert_fails('exe "normal /\\%#=2\\%2147483646c\"', 'E486:') + call assert_fails('exe "normal /\\%#=2\\%102261125v\"', 'E486:') call assert_equal('', matchstr('abcd', '\%o181\%o142')) endfunc