To: vim_dev@googlegroups.com Subject: Patch 8.0.0558 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0558 Problem: The :ownsyntax command is not tested. Solution: Add a test. (Dominique Pelle, closes #1622) Files: src/testdir/test_syntax.vim *** ../vim-8.0.0557/src/testdir/test_syntax.vim 2017-03-26 13:50:02.536929400 +0200 --- src/testdir/test_syntax.vim 2017-04-09 15:39:30.041476398 +0200 *************** *** 349,351 **** --- 349,380 ---- hi clear Nop hi clear @Wrong endfunc + + func Test_ownsyntax() + new Xfoo + call setline(1, '#define FOO') + syntax on + set filetype=c + ownsyntax perl + call assert_equal('perlComment', synIDattr(synID(line('.'), col('.'), 1), 'name')) + call assert_equal('c', b:current_syntax) + call assert_equal('perl', w:current_syntax) + + " A new split window should have the original syntax. + split + call assert_equal('cDefine', synIDattr(synID(line('.'), col('.'), 1), 'name')) + call assert_equal('c', b:current_syntax) + call assert_equal(0, exists('w:current_syntax')) + + wincmd x + call assert_equal('perlComment', synIDattr(synID(line("."), col("."), 1), "name")) + + syntax off + set filetype& + %bw! + endfunc + + func Test_ownsyntax_completion() + call feedkeys(":ownsyntax java\\\"\", 'tx') + call assert_equal('"ownsyntax java javacc javascript', @:) + endfunc *** ../vim-8.0.0557/src/version.c 2017-04-09 15:27:05.798135087 +0200 --- src/version.c 2017-04-09 15:40:44.037013557 +0200 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 558, /**/ -- TALL KNIGHT OF NI: Ni! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///