blob: c028606eb8d028ae93dc3528080f864ef37005a3 [file] [log] [blame]
Bram Moolenaarcf0213e2015-06-19 15:45:29 +02001Tests for perl interface. vim: set ft=vim :
2
3STARTTEST
4:so small.vim
5:set nocompatible viminfo+=nviminfo
6:if !has('perl') | e! test.ok | wq! test.out | endif
7:" change buffer contents
8:perl VIM::DoCommand("normal /^1\n")
9:perl $curline = VIM::Eval("line('.')")
10:perl $curbuf->Set($curline, "1 changed line 1")
11:" evaluate a List
12:perl VIM::DoCommand("normal /^2\n")
13:perl $curline = VIM::Eval("line('.')")
14:let l = ["abc", "def"]
15:perl << EOF
16$l = VIM::Eval("l");
17$curbuf->Append($curline, $l);
18EOF
19:normal j
20:.perldo s|\n|/|g
21:?^1?,$w! test.out
22:qa!
23ENDTEST
24
251 line 1
262 line 2