Bram Moolenaar | 6b2e938 | 2014-11-05 18:06:01 +0100 | [diff] [blame] | 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 |