Skip to content

Commit

Permalink
patch 8.2.1543: Vim9: test with invalid SID is skipped in the GUI
Browse files Browse the repository at this point in the history
Problem:    Vim9: test with invalid SID is skipped in the GUI.
Solution:   Read the CTRL-C that feedkeys() put in typeahead.
  • Loading branch information
brammool committed Aug 30, 2020
1 parent a563984 commit 25859dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/testdir/test_vim9_script.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -3177,7 +3179,7 @@ func Test_vim9script_not_global()
" caught
endtry

call delete('Xvim9script.vium')
call delete('Xvim9script.vim')
endfunc

def Test_vim9_copen()
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1543,
/**/
1542,
/**/
Expand Down

0 comments on commit 25859dd

Please sign in to comment.