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.
diff --git a/src/testdir/test_profile.vim b/src/testdir/test_profile.vim
index babed36..dbba800 100644
--- a/src/testdir/test_profile.vim
+++ b/src/testdir/test_profile.vim
@@ -310,13 +310,13 @@
 
 func Test_profile_file()
   let lines =<< trim [CODE]
-  func! Foo()
-  endfunc
-  for i in range(10)
-    " a comment
+    func! Foo()
+    endfunc
+    for i in range(10)
+      " a comment
+      call Foo()
+    endfor
     call Foo()
-  endfor
-  call Foo()
   [CODE]
 
   call writefile(lines, 'Xprofile_file.vim')