]> granicus.if.org Git - vim/commitdiff
patch 8.2.1543: Vim9: test with invalid SID is skipped in the GUI v8.2.1543
authorBram Moolenaar <Bram@vim.org>
Sun, 30 Aug 2020 10:54:53 +0000 (12:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 30 Aug 2020 10:54:53 +0000 (12:54 +0200)
Problem:    Vim9: test with invalid SID is skipped in the GUI.
Solution:   Read the CTRL-C that feedkeys() put in typeahead.

src/testdir/test_vim9_script.vim
src/version.c

index 6d520a33ef567639909da1dbe1a8de5f187588a2..8ebcc2877255cafb480a83ea1177fb64392b85bb 100644 (file)
@@ -2364,6 +2364,8 @@ def Test_interrupt_loop()
     assert_equal(100, x)
   endtry
   assert_true(caught, 'should have caught an exception')
+  # consume the CTRL-C
+  getchar(0)
 enddef
 
 def Test_automatic_line_continuation()
@@ -3177,7 +3179,7 @@ func Test_vim9script_not_global()
     " caught
   endtry
 
-  call delete('Xvim9script.vium')
+  call delete('Xvim9script.vim')
 endfunc
 
 def Test_vim9_copen()
@@ -3261,10 +3263,8 @@ def Test_cmdline_win()
 enddef
 
 def Test_invalid_sid()
-  # TODO: why does this not work in the GUI?
-  CheckNotGui
-
   assert_fails('func <SNR>1234_func', 'E123:')
+
   if RunVim([], ['wq Xdidit'], '+"func <SNR>1_func"')
     call assert_equal([], readfile('Xdidit'))
   endif
index 1a66eb6a31d3e830db6cd97825b7cb53e477c24f..8eaf4844772a8b6983c9af0985d16e17bc32f710 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1543,
 /**/
     1542,
 /**/