diff 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
line wrap: on
line diff
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -792,10 +792,11 @@ endfunc
 func Test_gui_dash_g()
   let cmd = GetVimCommand('Xscriptgui')
   call writefile([""], "Xtestgui")
-  call writefile([
-	\ 'au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")',
-	\ 'au GUIEnter * qall',
-	\ ], 'Xscriptgui')
+  let lines =<< trim END
+	au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
+	au GUIEnter * qall
+  END
+  call writefile(lines, 'Xscriptgui')
   call system(cmd . ' -g')
   call WaitForAssert({-> assert_equal(['insertmode: 0'], readfile('Xtestgui'))})
 
@@ -807,10 +808,11 @@ endfunc
 func Test_gui_dash_y()
   let cmd = GetVimCommand('Xscriptgui')
   call writefile([""], "Xtestgui")
-  call writefile([
-	\ 'au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")',
-	\ 'au GUIEnter * qall',
-	\ ], 'Xscriptgui')
+  let lines =<< trim END
+	au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
+	au GUIEnter * qall
+  END
+  call writefile(lines, 'Xscriptgui')
   call system(cmd . ' -y')
   call WaitForAssert({-> assert_equal(['insertmode: 1'], readfile('Xtestgui'))})