Skip to content

Commit 25859dd

Browse files
committed
patch 8.2.1543: Vim9: test with invalid SID is skipped in the GUI
Problem: Vim9: test with invalid SID is skipped in the GUI. Solution: Read the CTRL-C that feedkeys() put in typeahead.
1 parent a563984 commit 25859dd

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/testdir/test_vim9_script.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,6 +2364,8 @@ def Test_interrupt_loop()
23642364
assert_equal(100, x)
23652365
endtry
23662366
assert_true(caught, 'should have caught an exception')
2367+
# consume the CTRL-C
2368+
getchar(0)
23672369
enddef
23682370

23692371
def Test_automatic_line_continuation()
@@ -3177,7 +3179,7 @@ func Test_vim9script_not_global()
31773179
" caught
31783180
endtry
31793181

3180-
call delete('Xvim9script.vium')
3182+
call delete('Xvim9script.vim')
31813183
endfunc
31823184

31833185
def Test_vim9_copen()
@@ -3261,10 +3263,8 @@ def Test_cmdline_win()
32613263
enddef
32623264

32633265
def Test_invalid_sid()
3264-
# TODO: why does this not work in the GUI?
3265-
CheckNotGui
3266-
32673266
assert_fails('func <SNR>1234_func', 'E123:')
3267+
32683268
if RunVim([], ['wq Xdidit'], '+"func <SNR>1_func"')
32693269
call assert_equal([], readfile('Xdidit'))
32703270
endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1543,
757759
/**/
758760
1542,
759761
/**/

0 commit comments

Comments
 (0)