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\<Esc>', '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\<Esc>", 'xt')
+   call feedkeys("achange2\<Esc>", '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\<Esc>", '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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui