From 7befdb34198b3d0f570e5922fc2b9d0825dd69a1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 16 Jan 2021 20:41:10 -0500 Subject: vim-patch:8.2.2353: spartql files are not detected Problem: Spartql files are not detected. Solution: Add the sparql filetype. (closes vim/vim#7679) https://github.com/vim/vim/commit/17d015b2438e51d4d42d72720611d16c772cc4bb --- src/nvim/testdir/test_filetype.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index aa36f4e518..fb45dad483 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -429,6 +429,7 @@ let s:filename_checks = { \ 'smith': ['file.smt', 'file.smith'], \ 'sml': ['file.sml'], \ 'snobol4': ['file.sno', 'file.spt'], + \ 'sparql': ['file.rq', 'file.sparql'], \ 'spec': ['file.spec'], \ 'spice': ['file.sp', 'file.spice'], \ 'spup': ['file.speedup', 'file.spdata', 'file.spd'], -- cgit From 562877c1350683ea62e815824a8eec1075b6eae7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 16 Jan 2021 20:44:13 -0500 Subject: vim-patch:8.2.2355: stray test failure on Appveyor Problem: Stray test failure on Appveyor. Solution: Finish insert command. https://github.com/vim/vim/commit/97c6943e11516711541848e51db3cc2ace25bbb2 --- src/nvim/testdir/test_autocmd.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 641e98ab30..c571e37ac3 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -1110,14 +1110,14 @@ func Test_BufReadCmd() endfunc func SetChangeMarks(start, end) - exe a:start. 'mark [' - exe a:end. 'mark ]' + exe a:start .. 'mark [' + exe a:end .. 'mark ]' endfunc " Verify the effects of autocmds on '[ and '] func Test_change_mark_in_autocmds() edit! Xtest - call feedkeys("ia\b\c\d\u", 'xtn') + call feedkeys("ia\b\c\d\u\", 'xtn') call SetChangeMarks(2, 3) write -- cgit From abcd982bf0689b31d2d2464a536ea199fe4b50e7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 16 Jan 2021 20:45:56 -0500 Subject: vim-patch:8.2.2360: test leaves file behind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Test leaves file behind. Solution: Delete the right file. (Dominique Pellé, closes vim/vim#7689) https://github.com/vim/vim/commit/a3b494d6afa79aedce42fa4ecc7ef0dbae79e37e --- src/nvim/testdir/test_filetype.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index fb45dad483..180170fe9a 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -716,7 +716,7 @@ func Test_pp_file() call assert_equal('pascal', &filetype) bwipe! - call delete('Xfile.ts') + call delete('Xfile.pp') filetype off endfunc -- cgit From 6a01b3fcc361960e559db459e1524418bc76dd66 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 16 Jan 2021 21:07:25 -0500 Subject: vim-patch:8.2.2366: when using ":sleep" the cursor is always displayed Problem: When using ":sleep" the cursor is always displayed. Solution: Do not display the cursor when using ":sleep!". (Jeremy Lerner, closes vim/vim#7688) https://github.com/vim/vim/commit/e2edc2ed4a9a229870b1e1811b0ecf045b84e429 Cursor showing/hiding is moved from core to TUI. ":sleep!" behaves the same as ":sleep". --- src/nvim/testdir/test_sleep.vim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/nvim/testdir/test_sleep.vim (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_sleep.vim b/src/nvim/testdir/test_sleep.vim new file mode 100644 index 0000000000..f71855fd4b --- /dev/null +++ b/src/nvim/testdir/test_sleep.vim @@ -0,0 +1,26 @@ +" Test for sleep and sleep! commands + +func! s:get_time_ms() + let timestr = reltimestr(reltime()) + let dotidx = stridx(timestr, '.') + let sec = str2nr(timestr[:dotidx]) + let msec = str2nr(timestr[dotidx + 1:]) + return (sec * 1000) + (msec / 1000) +endfunc + +func! s:assert_takes_longer(cmd, time_ms) + let start = s:get_time_ms() + execute a:cmd + let end = s:get_time_ms() + call assert_true(end - start >=# a:time_ms) +endfun + +func! Test_sleep_bang() + call s:assert_takes_longer('sleep 50m', 50) + call s:assert_takes_longer('sleep! 50m', 50) + call s:assert_takes_longer('sl 50m', 50) + call s:assert_takes_longer('sl! 50m', 50) + call s:assert_takes_longer('1sleep', 1000) +endfunc + +" vim: shiftwidth=2 sts=2 expandtab -- cgit From 7cced24e93c4046b010ee4a622f288387df3bc75 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 17 Jan 2021 14:07:28 -0500 Subject: vim-patch:8.2.2368: insufficient tests for setting options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Insufficient tests for setting options. Solution: Add a few tests. (Dominique Pellé, closes vim/vim#7695) https://github.com/vim/vim/commit/85773bf32b51cbe7e971c5ac11cb9c743bb7a38a Cherry-pick some test cases for Test_set_error() from patches v8.2.0540, v8.2.0551. --- src/nvim/testdir/test_options.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index ccc5e6ffc9..84d99ebb74 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -266,8 +266,14 @@ func Test_set_errors() call assert_fails('set foldmarker=x', 'E536:') call assert_fails('set commentstring=x', 'E537:') call assert_fails('set complete=x', 'E539:') + call assert_fails('set rulerformat=%-', 'E539:') + call assert_fails('set rulerformat=%(', 'E542:') + call assert_fails('set rulerformat=%15(%%', 'E542:') + call assert_fails('set statusline=%$', 'E539:') call assert_fails('set statusline=%{', 'E540:') call assert_fails('set statusline=%(', 'E542:') + call assert_fails('set statusline=%)', 'E542:') + if has('cursorshape') " This invalid value for 'guicursor' used to cause Vim to crash. call assert_fails('set guicursor=i-ci,r-cr:h', 'E545:') @@ -281,6 +287,21 @@ func Test_set_errors() call assert_fails('set winminwidth=10 winwidth=9', 'E592:') call assert_fails("set showbreak=\x01", 'E595:') call assert_fails('set t_foo=', 'E846:') + if has('python') || has('python3') + call assert_fails('set pyxversion=6', 'E474:') + endif + call assert_fails("let &tabstop='ab'", 'E521:') + call assert_fails('set sessionoptions=curdir,sesdir', 'E474:') + call assert_fails('set foldmarker={{{,', 'E474:') + call assert_fails('set sessionoptions=sesdir,curdir', 'E474:') + call assert_fails('set listchars=trail:· ambiwidth=double', 'E834:') + set listchars& + call assert_fails('set fillchars=stl:· ambiwidth=double', 'E835:') + set fillchars& + call assert_fails('set fileencoding=latin1,utf-8', 'E474:') + set nomodifiable + call assert_fails('set fileencoding=latin1', 'E21:') + set modifiable& endfunc " Must be executed before other tests that set 'term'. -- cgit