diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-29 10:07:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-29 10:07:51 +0800 |
commit | 3287fc2ba9284d48e945ab0008b7844e1ec40eec (patch) | |
tree | 2844deffee1f539d8bf933654dda276bcb55bc9c /test/old/testdir/test_ruby.vim | |
parent | 129012172258a08efa87cbab927cdd3e4da7db90 (diff) | |
parent | 7b6d041baed712b071acfa8bb71727a5f5e27561 (diff) | |
download | rneovim-3287fc2ba9284d48e945ab0008b7844e1ec40eec.tar.gz rneovim-3287fc2ba9284d48e945ab0008b7844e1ec40eec.tar.bz2 rneovim-3287fc2ba9284d48e945ab0008b7844e1ec40eec.zip |
Merge pull request #23386 from zeertzjq/vim-8.2.0551
vim-patch:8.2.{0551,0578,0672}: heredoc for interfaces does not support "trim"
Diffstat (limited to 'test/old/testdir/test_ruby.vim')
-rw-r--r-- | test/old/testdir/test_ruby.vim | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/test/old/testdir/test_ruby.vim b/test/old/testdir/test_ruby.vim index 1fbf3392d9..4929496086 100644 --- a/test/old/testdir/test_ruby.vim +++ b/test/old/testdir/test_ruby.vim @@ -341,11 +341,11 @@ func Test_ruby_Vim_evaluate_list() call setline(line('$'), ['2 line 2']) ruby Vim.command("normal /^2\n") let l = ["abc", "def"] - ruby << EOF - curline = $curbuf.line_number - l = Vim.evaluate("l"); - $curbuf.append(curline, l.join("|")) -EOF + ruby << trim EOF + curline = $curbuf.line_number + l = Vim.evaluate("l"); + $curbuf.append(curline, l.join("|")) + EOF normal j .rubydo $_ = $_.gsub(/\|/, '/') call assert_equal('abc/def', getline('$')) @@ -414,4 +414,24 @@ func Test_rubyeval_error() call assert_fails('call rubyeval("(")') endfunc +" Test for various heredoc syntax +func Test_ruby_heredoc() + ruby << END +Vim.command('let s = "A"') +END + ruby << +Vim.command('let s ..= "B"') +. + ruby << trim END + Vim.command('let s ..= "C"') + END + ruby << trim + Vim.command('let s ..= "D"') + . + ruby << trim eof + Vim.command('let s ..= "E"') + eof + call assert_equal('ABCDE', s) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |