diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-08-20 22:41:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-20 22:41:24 +0200 |
| commit | 751c35d41b9ead471518938aeddbc98f0def65f2 (patch) | |
| tree | d87134769682b8f517ef735b8bfbc14da85caa31 /src/nvim/testdir/test_textobjects.vim | |
| parent | 768bc68d7eebbdb63a80c6cc3d81152cce755111 (diff) | |
| parent | 96035a8343eadd2aa09284b58ee8147070e8d571 (diff) | |
| download | rneovim-751c35d41b9ead471518938aeddbc98f0def65f2.tar.gz rneovim-751c35d41b9ead471518938aeddbc98f0def65f2.tar.bz2 rneovim-751c35d41b9ead471518938aeddbc98f0def65f2.zip | |
Merge #8872 from janlazo/vim-8.0.0762
Diffstat (limited to 'src/nvim/testdir/test_textobjects.vim')
| -rw-r--r-- | src/nvim/testdir/test_textobjects.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_textobjects.vim b/src/nvim/testdir/test_textobjects.vim index 684f197f5f..52c0c3698e 100644 --- a/src/nvim/testdir/test_textobjects.vim +++ b/src/nvim/testdir/test_textobjects.vim @@ -121,6 +121,23 @@ func Test_string_html_objects() enew! endfunc +func Test_empty_html_tag() + new + call setline(1, '<div></div>') + normal 0citxxx + call assert_equal('<div>xxx</div>', getline(1)) + + call setline(1, '<div></div>') + normal 0f<cityyy + call assert_equal('<div>yyy</div>', getline(1)) + + call setline(1, '<div></div>') + normal 0f<vitsaaa + call assert_equal('aaa', getline(1)) + + bwipe! +endfunc + " Tests for match() and matchstr() func Test_match() call assert_equal("b", matchstr("abcd", ".", 0, 2)) @@ -152,3 +169,16 @@ func Test_match() call assert_equal(3 , match('abc', '\zs', 3, 1)) call assert_equal(-1, match('abc', '\zs', 4, 1)) endfunc + +" This was causing an illegal memory access +func Test_inner_tag() + new + norm ixxx + call feedkeys("v", 'xt') + insert +x +x +. + norm it + q! +endfunc |