diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-12 17:56:46 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-12 17:57:04 -0400 |
commit | 0b38011328020b5072201522a62dc1e8e39a42b3 (patch) | |
tree | eda8da4c1e598a11128a7a0b5b68a026b0fd1d1d | |
parent | 7faf682525ab1274ed30f1a48336a89f53841136 (diff) | |
download | rneovim-0b38011328020b5072201522a62dc1e8e39a42b3.tar.gz rneovim-0b38011328020b5072201522a62dc1e8e39a42b3.tar.bz2 rneovim-0b38011328020b5072201522a62dc1e8e39a42b3.zip |
vim-patch:8.0.1243: no test for what 8.0.1227 fixes
Problem: No test for what 8.0.1227 fixes.
Solution: Add a test that triggers the problem. (Christian Brabandt)
https://github.com/vim/vim/commit/f45938cc20ed6992e5215ffe41b73b528c78be9c
-rw-r--r-- | src/nvim/testdir/test_normal.vim | 7 | ||||
-rw-r--r-- | src/nvim/testdir/test_search.vim | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index c638920dd3..4c63bd1f71 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -1201,6 +1201,13 @@ func! Test_normal19_z_spell() call assert_match("Word 'goood' added to ./Xspellfile2.add", a) call assert_equal('goood', cnt[0]) + " Test for :spellgood! + let temp = execute(':spe!0/0') + call assert_match('Invalid region', temp) + let spellfile = matchstr(temp, 'Invalid region nr in \zs.*\ze line \d: 0') + call assert_equal(['# goood', '# goood/!', '#oood', '0/0'], readfile(spellfile)) + call delete(spellfile) + " clean up exe "lang" oldlang call delete("./Xspellfile.add") diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 5da9397be5..50be1f83e6 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -453,3 +453,18 @@ func Test_search_multibyte() enew! let &encoding = save_enc endfunc + +func Test_search_undefined_behaviour() + if !has("terminal") + return + endif + let h = winheight(0) + if h < 3 + return + endif + " did cause an undefined left shift + let g:buf = term_start([GetVimProg(), '--clean', '-e', '-s', '-c', 'call search(getline("."))', 'samples/test000'], {'term_rows': 3}) + call assert_equal([''], getline(1, '$')) + call term_sendkeys(g:buf, ":qa!\<cr>") + bwipe! +endfunc |