annotate src/testdir/test_writefile.in @ 9587:05a56bbe34a1 v7.4.2071

commit https://github.com/vim/vim/commit/f562e72df726c6191fa305e1c0a113f1cfb87f76 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 19 17:25:25 2016 +0200 patch 7.4.2071 Problem: The return value of type() is difficult to use. Solution: Define v:t_ constants. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Jul 2016 17:30:06 +0200
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