view src/testdir/test_writefile.in @ 9025:0bc1d66dfa2f v7.4.1798

commit https://github.com/vim/vim/commit/bb82762907ba024717ad9af3b229c2fa6405cd36 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 29 22:33:27 2016 +0200 patch 7.4.1798 Problem: Still compiler warning for unused return value. (Charles Campbell) Solution: Assign to ignoredp.
author Christian Brabandt <cb@256bit.org>
date Fri, 29 Apr 2016 22:45:06 +0200
parents 26bb1a6abe25
children
line wrap: on
line source

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