mirror of
https://github.com/vim/vim.git
synced 2026-02-10 20:26:43 +01:00
Problem: Cannot append a list of lines to a file. Solution: Add the append option to writefile(). (Yasuhiro Matsumoto)
19 lines
357 B
Plaintext
19 lines
357 B
Plaintext
Tests for writefile()
|
|
|
|
STARTTEST
|
|
:source small.vim
|
|
:%delete _
|
|
:let f = tempname()
|
|
:call writefile(["over","written"], f, "b")
|
|
:call writefile(["hello","world"], f, "b")
|
|
:call writefile(["!", "good"], f, "a")
|
|
:call writefile(["morning"], f, "ab")
|
|
:call writefile(["", "vimmers"], f, "ab")
|
|
:bwipeout!
|
|
:$put =readfile(f)
|
|
:1 delete _
|
|
:w! test.out
|
|
:qa!
|
|
ENDTEST
|
|
|