Patch 8.2.5111

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 16, 2022, 9:46:45 AM6/16/22
to vim...@googlegroups.com

Patch 8.2.5111
Problem: No test for --gui-dialog-file.
Solution: Add a test.
Files: src/testdir/test_gui.vim


*** ../vim-8.2.5110/src/testdir/test_gui.vim 2022-05-31 17:03:11.271702930 +0100
--- src/testdir/test_gui.vim 2022-06-16 14:31:00.588078932 +0100
***************
*** 118,126 ****

let test_call = 'Can you hear me?'
let test_response = 'Yes, I can.'
! let vim_exe = GetVimCommand()
! let testee = 'VIMRUNTIME=' . $VIMRUNTIME . '; export VIMRUNTIME;'
! \ . vim_exe . ' --noplugin --not-a-term -c ''%s'''
" Ignore the "failed to create input context" error.
let cmd = 'call test_ignore_error("E285") | '
\ . 'gui -f | '
--- 118,125 ----

let test_call = 'Can you hear me?'
let test_response = 'Yes, I can.'
! let testee = 'VIMRUNTIME=' .. $VIMRUNTIME .. '; export VIMRUNTIME;'
! \ .. GetVimCommand() .. ' --noplugin --not-a-term -c ''%s'''
" Ignore the "failed to create input context" error.
let cmd = 'call test_ignore_error("E285") | '
\ . 'gui -f | '
***************
*** 1588,1591 ****
--- 1587,1607 ----
unlet g:str
endfunc

+ func Test_gui_dialog_file()
+ let lines =<< trim END
+ file Xfile
+ normal axxx
+ confirm qa
+ END
+ call writefile(lines, 'Xlines')
+ execute '!' .. GetVimCommand() .. ' -g -f --clean --gui-dialog-file Xdialog -S Xlines'
+
+ call WaitForAssert({-> assert_true(filereadable('Xdialog'))})
+ call assert_match('Question: Save changes to "Xfile"?', readfile('Xdialog')->join('<NL>'))
+
+ call delete('Xdialog')
+ call delete('Xfile')
+ call delete('Xlines')
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.5110/src/version.c 2022-06-16 13:27:13.360882932 +0100
--- src/version.c 2022-06-16 14:32:00.311919684 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5111,
/**/

--
People who want to share their religious views with you
almost never want you to share yours with them.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages