To: vim_dev@googlegroups.com Subject: Patch 7.4.2296 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2296 Problem: No tests for :undolist and "U" command. Solution: Add tests. (Dominique Pelle) Files: src/testdir/test_undo.vim *** ../vim-7.4.2295/src/testdir/test_undo.vim 2016-07-29 16:15:13.038677979 +0200 --- src/testdir/test_undo.vim 2016-08-31 20:30:21.412980092 +0200 *************** *** 129,134 **** --- 129,167 ---- close! endfunc + func Test_undolist() + new + set ul=100 + + let a=execute('undolist') + call assert_equal("\nNothing to undo", a) + + " 1 leaf (2 changes). + call feedkeys('achange1', 'xt') + call feedkeys('achange2', 'xt') + let a=execute('undolist') + call assert_match("^\nnumber changes when *saved\n *2 *2 .*$", a) + + " 2 leaves. + call feedkeys('u', 'xt') + call feedkeys('achange3\', 'xt') + let a=execute('undolist') + call assert_match("^\nnumber changes when *saved\n *2 *2 *.*\n *3 *2 .*$", a) + close! + endfunc + + func Test_U_command() + new + set ul=100 + call feedkeys("achange1\", 'xt') + call feedkeys("achange2\", 'xt') + norm! U + call assert_equal('', getline(1)) + norm! U + call assert_equal('change1change2', getline(1)) + close! + endfunc + func Test_undojoin() new call feedkeys("Goaaaa\", 'xt') *** ../vim-7.4.2295/src/version.c 2016-08-30 10:56:38.914580533 +0200 --- src/version.c 2016-08-31 20:31:05.592558787 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2296, /**/ -- Amnesia is one of my favorite words, but I forgot what it means. /// 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 ///