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
:call delete(f)
:qa!
ENDTEST

