Patch 8.1.0896
Problem:    Tests for restricted mode no run for MS-Windows GUI.
Solution:   Make tests also work in MS-Windows GUI.
Files:      src/testdir/test_restricted.vim


*** ../vim-8.1.0895/src/testdir/test_restricted.vim     2019-02-09 
11:13:07.003647800 +0100
--- src/testdir/test_restricted.vim     2019-02-11 21:43:42.560393515 +0100
***************
*** 2,28 ****
  
  source shared.vim
  
! if has('win32') && has('gui')
!   " Win32 GUI shows a dialog instead of displaying the error in the last line.
!   finish
! endif
  
  func Test_restricted()
!   let cmd = GetVimCommand('Xrestricted')
!   if cmd == ''
!     return
!   endif
! 
!   call writefile([
!       \ "silent !ls",
!       \ "call writefile([v:errmsg], 'Xrestrout')",
!       \ "qa!",
!       \ ], 'Xrestricted')
!   call system(cmd . ' -Z')
!   call assert_match('E145:', join(readfile('Xrestrout')))
! 
!   call delete('Xrestricted')
!   call delete('Xrestrout')
  endfunc
  
  func Run_restricted_test(ex_cmd, error)
--- 2,14 ----
  
  source shared.vim
  
! "if has('win32') && has('gui')
! "  " Win32 GUI shows a dialog instead of displaying the error in the last 
line.
! "  finish
! "endif
  
  func Test_restricted()
!   call Run_restricted_test('!ls', 'E145:')
  endfunc
  
  func Run_restricted_test(ex_cmd, error)
***************
*** 31,40 ****
      return
    endif
  
    call writefile([
!       \ a:ex_cmd,
!       \ "call writefile([v:errmsg], 'Xrestrout')",
!       \ "qa!",
        \ ], 'Xrestricted')
    call system(cmd . ' -Z')
    call assert_match(a:error, join(readfile('Xrestrout')))
--- 17,31 ----
      return
    endif
  
+   " Use a VimEnter autocommand to avoid that the error message is displayed in
+   " a dialog with an OK button.
    call writefile([
!       \ "func Init()",
!       \ "  silent! " . a:ex_cmd,
!       \ "  call writefile([v:errmsg], 'Xrestrout')",
!       \ "  qa!",
!       \ "endfunc",
!       \ "au VimEnter * call Init()",
        \ ], 'Xrestricted')
    call system(cmd . ' -Z')
    call assert_match(a:error, join(readfile('Xrestrout')))
*** ../vim-8.1.0895/src/version.c       2019-02-10 23:26:10.099319000 +0100
--- src/version.c       2019-02-11 21:42:44.812691413 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     896,
  /**/

-- 
(letter from Mark to Mike, about the film's probable certificate)
      For an 'A' we would have to: Lose as many shits as possible; Take Jesus
      Christ out, if possible; Loose "I fart in your general direction"; Lose
      "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
      testicles"
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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