comparison src/testdir/test_gui.vim @ 17172:6990c1160ea5 v8.1.1585

patch 8.1.1585: :let-heredoc does not trim enough commit https://github.com/vim/vim/commit/e7eb92708ec2092a2fc11e78703b5dcf83844412 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 24 00:58:07 2019 +0200 patch 8.1.1585: :let-heredoc does not trim enough Problem: :let-heredoc does not trim enough. Solution: Trim indent from the contents based on the indent of the first line. Use let-heredoc in more tests.
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 Jun 2019 01:00:05 +0200
parents 8e9e9124c7a2
children 0da9bc55c31a
comparison
equal deleted inserted replaced
17171:1b0f624dcd8d 17172:6990c1160ea5
790 790
791 " Test "vim -g" and also the GUIEnter autocommand. 791 " Test "vim -g" and also the GUIEnter autocommand.
792 func Test_gui_dash_g() 792 func Test_gui_dash_g()
793 let cmd = GetVimCommand('Xscriptgui') 793 let cmd = GetVimCommand('Xscriptgui')
794 call writefile([""], "Xtestgui") 794 call writefile([""], "Xtestgui")
795 call writefile([ 795 let lines =<< trim END
796 \ 'au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")', 796 au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
797 \ 'au GUIEnter * qall', 797 au GUIEnter * qall
798 \ ], 'Xscriptgui') 798 END
799 call writefile(lines, 'Xscriptgui')
799 call system(cmd . ' -g') 800 call system(cmd . ' -g')
800 call WaitForAssert({-> assert_equal(['insertmode: 0'], readfile('Xtestgui'))}) 801 call WaitForAssert({-> assert_equal(['insertmode: 0'], readfile('Xtestgui'))})
801 802
802 call delete('Xscriptgui') 803 call delete('Xscriptgui')
803 call delete('Xtestgui') 804 call delete('Xtestgui')
805 806
806 " Test "vim -7" and also the GUIEnter autocommand. 807 " Test "vim -7" and also the GUIEnter autocommand.
807 func Test_gui_dash_y() 808 func Test_gui_dash_y()
808 let cmd = GetVimCommand('Xscriptgui') 809 let cmd = GetVimCommand('Xscriptgui')
809 call writefile([""], "Xtestgui") 810 call writefile([""], "Xtestgui")
810 call writefile([ 811 let lines =<< trim END
811 \ 'au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")', 812 au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
812 \ 'au GUIEnter * qall', 813 au GUIEnter * qall
813 \ ], 'Xscriptgui') 814 END
815 call writefile(lines, 'Xscriptgui')
814 call system(cmd . ' -y') 816 call system(cmd . ' -y')
815 call WaitForAssert({-> assert_equal(['insertmode: 1'], readfile('Xtestgui'))}) 817 call WaitForAssert({-> assert_equal(['insertmode: 1'], readfile('Xtestgui'))})
816 818
817 call delete('Xscriptgui') 819 call delete('Xscriptgui')
818 call delete('Xtestgui') 820 call delete('Xtestgui')