Patch 8.1.1047
Problem:    WINCH signal is not tested.
Solution:   Add a test. (Dominique Pelle, closes #4158)
Files:      src/testdir/Make_all.mak, src/testdir/test_signals.vim


*** ../vim-8.1.1046/src/testdir/Make_all.mak    2019-03-14 13:42:57.169435481 
+0100
--- src/testdir/Make_all.mak    2019-03-24 14:54:25.343711086 +0100
***************
*** 224,229 ****
--- 224,230 ----
        test_searchpos \
        test_set \
        test_sha256 \
+       test_signals \
        test_signs \
        test_smartindent \
        test_sort \
***************
*** 385,390 ****
--- 386,392 ----
        test_scrollbind.res \
        test_search.res \
        test_shortpathname.res \
+       test_signals.res \
        test_signs.res \
        test_smartindent.res \
        test_source.res \
*** ../vim-8.1.1046/src/testdir/test_signals.vim        2019-03-24 
14:57:43.686391002 +0100
--- src/testdir/test_signals.vim        2019-03-24 14:53:51.031939485 +0100
***************
*** 0 ****
--- 1,44 ----
+ " Test signal handling.
+ 
+ if !has('unix')
+   finish
+ endif
+ 
+ source shared.vim
+ 
+ " Test signal WINCH (window resize signal)
+ func Test_signal_WINCH()
+   let signals = system('kill -l')
+   if signals !~ '\<WINCH\>'
+     " signal WINCH is not available, skip the test.
+     return
+   endif
+ 
+   " We do not actually want to change the size of the terminal.
+   let old_WS = ''
+   if exists('&t_WS')
+     let old_WS = &t_WS
+     let &t_WS = ''
+   endif
+ 
+   let old_lines = &lines
+   let old_columns = &columns
+   let new_lines = &lines - 2
+   let new_columns = &columns - 2
+ 
+   exe 'set lines=' . new_lines
+   exe 'set columns=' . new_columns
+   call assert_equal(new_lines, &lines)
+   call assert_equal(new_columns, &columns)
+ 
+   " Send signal and wait for signal to be processed.
+   " 'lines' and 'columns' should have been restored
+   " after handing signal WINCH.
+   exe 'silent !kill -s WINCH ' . getpid()
+   call WaitForAssert({-> assert_equal(old_lines, &lines)})
+   call assert_equal(old_columns, &columns)
+ 
+   if old_WS != ''
+     let &t_WS = old_WS
+   endif
+ endfunc
*** ../vim-8.1.1046/src/version.c       2019-03-24 14:02:00.981468747 +0100
--- src/version.c       2019-03-24 14:30:13.869404055 +0100
***************
*** 777,778 ****
--- 777,780 ----
  {   /* Add new patch number below this line */
+ /**/
+     1047,
  /**/

-- 
Corduroy pillows: They're making headlines!

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