Patch 8.0.1811
Problem:    No test for winrestcmd().
Solution:   Add a test. (Dominique Pelle, closes #2894)
Files:      src/testdir/test_window_cmd.vim


*** ../vim-8.0.1810/src/testdir/test_window_cmd.vim     2018-04-13 
20:41:24.856374986 +0200
--- src/testdir/test_window_cmd.vim     2018-05-10 18:19:36.478770626 +0200
***************
*** 17,23 ****
  endfunc
  
  func Test_window_cmd_cmdwin_with_vsp()
!   let efmt='Expected 0 but got %d (in ls=%d, %s window)'
    for v in range(0, 2)
      exec "set ls=" . v
      vsplit
--- 17,23 ----
  endfunc
  
  func Test_window_cmd_cmdwin_with_vsp()
!   let efmt = 'Expected 0 but got %d (in ls=%d, %s window)'
    for v in range(0, 2)
      exec "set ls=" . v
      vsplit
***************
*** 444,464 ****
  
    exe "norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+"
    redraw
!   let s3=GetScreenStr(1)
    wincmd p
    call assert_equal(1, line("w0"))
    call assert_equal('1  ', s3)
  
    exe "norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+"
    redraw
!   let s3=GetScreenStr(1)
    wincmd p
    call assert_equal(50, line("w0"))
    call assert_equal('50 ', s3)
  
    exe "norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+"
    redraw
!   let s3=GetScreenStr(1)
    wincmd p
    call assert_equal(59, line("w0"))
    call assert_equal('59 ', s3)
--- 444,464 ----
  
    exe "norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+"
    redraw
!   let s3 = GetScreenStr(1)
    wincmd p
    call assert_equal(1, line("w0"))
    call assert_equal('1  ', s3)
  
    exe "norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+"
    redraw
!   let s3 = GetScreenStr(1)
    wincmd p
    call assert_equal(50, line("w0"))
    call assert_equal('50 ', s3)
  
    exe "norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+"
    redraw
!   let s3 = GetScreenStr(1)
    wincmd p
    call assert_equal(59, line("w0"))
    call assert_equal('59 ', s3)
***************
*** 507,510 ****
--- 507,525 ----
    bwipe!
  endfunc
  
+ func Test_winrestcmd()
+   2split
+   3vsplit
+   let a = winrestcmd()
+   call assert_equal(2, winheight(0))
+   call assert_equal(3, winwidth(0))
+   wincmd =
+   call assert_notequal(2, winheight(0))
+   call assert_notequal(3, winwidth(0))
+   exe a
+   call assert_equal(2, winheight(0))
+   call assert_equal(3, winwidth(0))
+   only
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.0.1810/src/version.c       2018-05-10 18:05:52.545048437 +0200
--- src/version.c       2018-05-10 18:22:38.573473480 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1811,
  /**/

-- 
Two cows are standing together in a field.  One asks the other:
"So what do you think about this Mad Cow Disease?"
The other replies: "That doesn't concern me. I'm a helicopter."

 /// 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