Skip to content

Commit de8be2b

Browse files
committed
patch 8.2.5111: no test for --gui-dialog-file
Problem: No test for --gui-dialog-file. Solution: Add a test.
1 parent bf66146 commit de8be2b

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

src/testdir/test_gui.vim

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ func Test_quoteplus()
118118

119119
let test_call = 'Can you hear me?'
120120
let test_response = 'Yes, I can.'
121-
let vim_exe = GetVimCommand()
122-
let testee = 'VIMRUNTIME=' . $VIMRUNTIME . '; export VIMRUNTIME;'
123-
\ . vim_exe . ' --noplugin --not-a-term -c ''%s'''
121+
let testee = 'VIMRUNTIME=' .. $VIMRUNTIME .. '; export VIMRUNTIME;'
122+
\ .. GetVimCommand() .. ' --noplugin --not-a-term -c ''%s'''
124123
" Ignore the "failed to create input context" error.
125124
let cmd = 'call test_ignore_error("E285") | '
126125
\ . 'gui -f | '
@@ -1588,4 +1587,21 @@ func Test_gui_CTRL_SHIFT_V()
15881587
unlet g:str
15891588
endfunc
15901589

1590+
func Test_gui_dialog_file()
1591+
let lines =<< trim END
1592+
file Xfile
1593+
normal axxx
1594+
confirm qa
1595+
END
1596+
call writefile(lines, 'Xlines')
1597+
execute '!' .. GetVimCommand() .. ' -g -f --clean --gui-dialog-file Xdialog -S Xlines'
1598+
1599+
call WaitForAssert({-> assert_true(filereadable('Xdialog'))})
1600+
call assert_match('Question: Save changes to "Xfile"?', readfile('Xdialog')->join('<NL>'))
1601+
1602+
call delete('Xdialog')
1603+
call delete('Xfile')
1604+
call delete('Xlines')
1605+
endfunc
1606+
15911607
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

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

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
5111,
737739
/**/
738740
5110,
739741
/**/

0 commit comments

Comments
 (0)