From 5a752c97d5294f4a69613db71adf9beb6a8f8790 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 29 Nov 2018 01:51:26 +0100 Subject: vim-patch:8.1.0098: segfault when pattern with \z() is very slow (#9283) Problem: Segfault when pattern with \z() is very slow. Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be able to test this. Fix that 'searchhl' resets called_emsg. https://github.com/vim/vim/commit/bcf9442307075bac40d44328c8bf7ea21857b138 closes #8788 --- src/nvim/testdir/test_syntax.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir/test_syntax.vim') diff --git a/src/nvim/testdir/test_syntax.vim b/src/nvim/testdir/test_syntax.vim index e35c0f1105..e70d9b7c66 100644 --- a/src/nvim/testdir/test_syntax.vim +++ b/src/nvim/testdir/test_syntax.vim @@ -482,3 +482,15 @@ fun Test_synstack_synIDtrans() syn clear bw! endfunc + +" Using \z() in a region with NFA failing should not crash. +func Test_syn_wrong_z_one() + new + call setline(1, ['just some text', 'with foo and bar to match with']) + syn region FooBar start="foo\z(.*\)bar" end="\z1" + " call test_override("nfa_fail", 1) + redraw! + redraw! + " call test_override("ALL", 0) + bwipe! +endfunc -- cgit From abd32c1bb8c01725291a8de2a691b89ee7050012 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 3 Dec 2018 22:46:11 -0500 Subject: vim-patch:8.1.0559: command line completion not sufficiently tested Problem: Command line completion not sufficiently tested. Solution: Add more tests. (Dominique Pelle, closes vim/vim#3622) https://github.com/vim/vim/commit/b513d3079bbe3f59a1f1a3d6931939a76cd7e54a --- src/nvim/testdir/test_syntax.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/testdir/test_syntax.vim') diff --git a/src/nvim/testdir/test_syntax.vim b/src/nvim/testdir/test_syntax.vim index e70d9b7c66..6978faeb7b 100644 --- a/src/nvim/testdir/test_syntax.vim +++ b/src/nvim/testdir/test_syntax.vim @@ -114,6 +114,15 @@ func Test_syntime() bd endfunc +func Test_syntime_completion() + if !has('profile') + return + endif + + call feedkeys(":syntime \\\"\", 'tx') + call assert_equal('"syntime clear off on report', @:) +endfunc + func Test_syntax_list() syntax on let a = execute('syntax list') -- cgit