diff options
Diffstat (limited to 'test/old/testdir/test_pyx3.vim')
-rw-r--r-- | test/old/testdir/test_pyx3.vim | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/test/old/testdir/test_pyx3.vim b/test/old/testdir/test_pyx3.vim index db39f5134a..09ece6f812 100644 --- a/test/old/testdir/test_pyx3.vim +++ b/test/old/testdir/test_pyx3.vim @@ -15,10 +15,10 @@ endfunc func Test_pyx() redir => var - pyx << EOF -import sys -print(sys.version) -EOF + pyx << trim EOF + import sys + print(sys.version) + EOF redir END call assert_match(s:py3pattern, split(var)[0]) endfunc @@ -79,3 +79,25 @@ func Test_Catch_Exception_Message() call assert_match('^Vim(.*):.*RuntimeError: TEST$', v:exception ) endtry endfunc + +" Test for various heredoc syntaxes +func Test_pyx3_heredoc() + pyx << END +result='A' +END + pyx << +result+='B' +. + pyx << trim END + result+='C' + END + pyx << trim + result+='D' + . + pyx << trim eof + result+='E' + eof + call assert_equal('ABCDE', pyxeval('result')) +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |