Mercurial > vim
annotate src/testdir/test_writefile.in @ 6341:094a87e76155 v7.4.503
updated for version 7.4.503
Problem: Cannot append a list of lines to a file.
Solution: Add the append option to writefile(). (Yasuhiro Matsumoto)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 05 Nov 2014 18:06:01 +0100 |
parents | |
children | 26bb1a6abe25 |
rev | line source |
---|---|
6341 | 1 Tests for writefile() |
2 | |
3 STARTTEST | |
4 :source small.vim | |
5 :%delete _ | |
6 :let f = tempname() | |
7 :call writefile(["over","written"], f, "b") | |
8 :call writefile(["hello","world"], f, "b") | |
9 :call writefile(["!", "good"], f, "a") | |
10 :call writefile(["morning"], f, "ab") | |
11 :call writefile(["", "vimmers"], f, "ab") | |
12 :bwipeout! | |
13 :$put =readfile(f) | |
14 :1 delete _ | |
15 :w! test.out | |
16 :qa! | |
17 ENDTEST | |
18 |