To: vim_dev@googlegroups.com Subject: Patch 8.2.5111 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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('')) + + 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 -- Bram@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 ///