annotate src/testdir/test_writefile.in @ 8104:1a03abdc4234 v7.4.1346

commit https://github.com/vim/vim/commit/a1e24b9bc9123ff6dd23e3cac2287a4411ef5572 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 18 20:18:09 2016 +0100 patch 7.4.1346 Problem: Compiler warnings in build with -O2. Solution: Add inintializations.
author Christian Brabandt <cb@256bit.org>
date Thu, 18 Feb 2016 20:30:04 +0100
parents 26bb1a6abe25
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6341
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for writefile()
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :source small.vim
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :%delete _
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :let f = tempname()
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :call writefile(["over","written"], f, "b")
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :call writefile(["hello","world"], f, "b")
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :call writefile(["!", "good"], f, "a")
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :call writefile(["morning"], f, "ab")
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 :call writefile(["", "vimmers"], f, "ab")
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :bwipeout!
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :$put =readfile(f)
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :1 delete _
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :w! test.out
7763
26bb1a6abe25 commit https://github.com/vim/vim/commit/f4f79b84a5595c511f6fdbe4e3e1d188d97879a0
Christian Brabandt <cb@256bit.org>
parents: 6341
diff changeset
16 :call delete(f)
6341
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :qa!
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 ENDTEST
094a87e76155 updated for version 7.4.503
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19