To: vim_dev@googlegroups.com Subject: Patch 8.2.2368 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2368 Problem: Insufficient tests for setting options. Solution: Add a few tests. (Dominique Pellé, closes #7695) Files: src/testdir/test_options.vim *** ../vim-8.2.2367/src/testdir/test_options.vim 2020-12-28 15:41:37.171352372 +0100 --- src/testdir/test_options.vim 2021-01-17 13:46:42.042597066 +0100 *************** *** 371,378 **** --- 371,384 ---- 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:') *************** *** 406,416 **** call assert_fails('set wildchar=', 'E474:') call assert_fails('set cmdheight=1a', 'E521:') call assert_fails('set invcmdheight', 'E474:') ! if has('python') && has('python3') call assert_fails('set pyxversion=6', 'E474:') endif call assert_fails("let &tabstop='ab'", 'E521:') call assert_fails('set spellcapcheck=%\\(', 'E54:') endfunc func CheckWasSet(name) --- 412,433 ---- call assert_fails('set wildchar=', 'E474:') call assert_fails('set cmdheight=1a', 'E521:') call assert_fails('set invcmdheight', 'E474:') ! if has('python') || has('python3') call assert_fails('set pyxversion=6', 'E474:') endif call assert_fails("let &tabstop='ab'", 'E521:') call assert_fails('set spellcapcheck=%\\(', 'E54:') + 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 func CheckWasSet(name) *** ../vim-8.2.2367/src/version.c 2021-01-17 13:21:14.962687183 +0100 --- src/version.c 2021-01-17 13:47:44.742531956 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2368, /**/ -- An error has occurred. Hit any user to continue. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///