To: vim_dev@googlegroups.com Subject: Patch 8.0.1184 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1184 Problem: The :marks command is not tested. Solution: Add a test. (Dominique Pelle, closes #2197) Files: src/testdir/test_marks.vim *** ../vim-8.0.1183/src/testdir/test_marks.vim 2017-01-28 18:23:49.725039260 +0100 --- src/testdir/test_marks.vim 2017-10-08 21:36:50.102513627 +0200 *************** *** 68,70 **** --- 68,122 ---- call win_gotoid(twowin) bwipe! endfunc + + func Test_marks_cmd() + new Xone + call setline(1, ['aaa', 'bbb']) + norm! maG$mB + w! + new Xtwo + call setline(1, ['ccc', 'ddd']) + norm! $mcGmD + w! + + b Xone + let a=split(execute('marks'), "\n") + call assert_equal(9, len(a)) + call assert_equal('mark line col file/text', a[0]) + call assert_equal(" ' 2 0 bbb", a[1]) + call assert_equal(' a 1 0 aaa', a[2]) + call assert_equal(' B 2 2 bbb', a[3]) + call assert_equal(' D 2 0 Xtwo', a[4]) + call assert_equal(' " 1 0 aaa', a[5]) + call assert_equal(' [ 1 0 aaa', a[6]) + call assert_equal(' ] 2 0 bbb', a[7]) + call assert_equal(' . 2 0 bbb', a[8]) + + b Xtwo + let a=split(execute('marks'), "\n") + call assert_equal(9, len(a)) + call assert_equal('mark line col file/text', a[0]) + call assert_equal(" ' 1 0 ccc", a[1]) + call assert_equal(' c 1 2 ccc', a[2]) + call assert_equal(' B 2 2 Xone', a[3]) + call assert_equal(' D 2 0 ddd', a[4]) + call assert_equal(' " 2 0 ddd', a[5]) + call assert_equal(' [ 1 0 ccc', a[6]) + call assert_equal(' ] 2 0 ddd', a[7]) + call assert_equal(' . 2 0 ddd', a[8]) + + b Xone + delmarks aB + let a=split(execute('marks aBcD'), "\n") + call assert_equal(2, len(a)) + call assert_equal('mark line col file/text', a[0]) + call assert_equal(' D 2 0 Xtwo', a[1]) + + b Xtwo + delmarks cD + call assert_fails('marks aBcD', 'E283:') + + call delete('Xone') + call delete('Xtwo') + %bwipe + endfunc *** ../vim-8.0.1183/src/version.c 2017-10-08 17:56:52.227266866 +0200 --- src/version.c 2017-10-08 21:37:42.338222704 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1184, /**/ -- FIRST HEAD: Oh! quick! get the sword out I want to cut his head off. THIRD HEAD: Oh, cut your own head off. SECOND HEAD: Yes - do us all a favour. "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 ///