diff options
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_excmd.vim | 10 | ||||
| -rw-r--r-- | src/nvim/testdir/test_regexp_latin.vim | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim new file mode 100644 index 0000000000..f5ce979208 --- /dev/null +++ b/src/nvim/testdir/test_excmd.vim @@ -0,0 +1,10 @@ +" Tests for various Ex commands. + +func Test_ex_delete() + new + call setline(1, ['a', 'b', 'c']) + 2 + " :dl is :delete with the "l" flag, not :dlist + .dl + call assert_equal(['a', 'c'], getline(1, 2)) +endfunc diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim index de209fa9ec..b5e99b0ed3 100644 --- a/src/nvim/testdir/test_regexp_latin.vim +++ b/src/nvim/testdir/test_regexp_latin.vim @@ -85,3 +85,16 @@ func Test_multi_failure() call assert_fails('/a\{a}', 'E870:') set re=0 endfunc + +func Test_recursive_addstate() + " This will call addstate() recursively until it runs into the limit. + let lnum = search('\v((){328}){389}') + call assert_equal(0, lnum) +endfunc + +func Test_out_of_memory() + new + s/^/,n + " This will be slow... + call assert_fails('call search("\\v((n||<)+);")', 'E363:') +endfunc |