diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-24 00:58:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-24 00:58:07 +0200 |
commit | e7eb92708ec2092a2fc11e78703b5dcf83844412 (patch) | |
tree | d00da20838b81404557c7b0ef17d2890f18175ac /src/testdir/test_popup.vim | |
parent | 0a1f56fcfe31be929e9cd8c3d81a984c960e4180 (diff) |
patch 8.1.1585: :let-heredoc does not trim enoughv8.1.1585
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.
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r-- | src/testdir/test_popup.vim | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index edb039944c..b25108c4e1 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -737,12 +737,13 @@ func Test_popup_and_previewwindow_dump() if !CanRunVimInTerminal() throw 'Skipped: cannot make screendumps' endif - call writefile([ - \ 'set previewheight=9', - \ 'silent! pedit', - \ 'call setline(1, map(repeat(["ab"], 10), "v:val. v:key"))', - \ 'exec "norm! G\<C-E>\<C-E>"', - \ ], 'Xscript') + let lines =<< trim END + set previewheight=9 + silent! pedit + call setline(1, map(repeat(["ab"], 10), "v:val. v:key")) + exec "norm! G\<C-E>\<C-E>" + END + call writefile(lines, 'Xscript') let buf = RunVimInTerminal('-S Xscript', {}) " Test that popup and previewwindow do not overlap. @@ -799,11 +800,12 @@ func Test_popup_position() if !CanRunVimInTerminal() throw 'Skipped: cannot make screendumps' endif - call writefile([ - \ '123456789_123456789_123456789_a', - \ '123456789_123456789_123456789_b', - \ ' 123', - \ ], 'Xtest') + let lines =<< trim END + 123456789_123456789_123456789_a + 123456789_123456789_123456789_b + 123 + END + call writefile(lines, 'Xtest') let buf = RunVimInTerminal('Xtest', {}) call term_sendkeys(buf, ":vsplit\<CR>") @@ -842,11 +844,12 @@ func Test_popup_command() throw 'Skipped: cannot make screendumps and/or menu feature missing' endif - call writefile([ - \ 'one two three four five', - \ 'and one two Xthree four five', - \ 'one more two three four five', - \ ], 'Xtest') + let lines =<< trim END + one two three four five + and one two Xthree four five + one more two three four five + END + call writefile(lines, 'Xtest') let buf = RunVimInTerminal('Xtest', {}) call term_sendkeys(buf, ":source $VIMRUNTIME/menu.vim\<CR>") call term_sendkeys(buf, "/X\<CR>:popup PopUp\<CR>") |