Mercurial > vim
comparison src/testdir/test_writefile.vim @ 10068:c577c6a2e88b v7.4.2305
commit https://github.com/vim/vim/commit/19a1669ffc796e30a83c5600f82f12ebf63a2261
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 1 22:19:47 2016 +0200
patch 7.4.2305
Problem: Marks, writefile and nested function tests are old style.
Solution: Turn them into new style tests. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 01 Sep 2016 22:30:08 +0200 |
parents | |
children | 4a1f7849fe86 |
comparison
equal
deleted
inserted
replaced
10067:4d790349eb7d | 10068:c577c6a2e88b |
---|---|
1 | |
2 function! Test_WriteFile() | |
3 let f = tempname() | |
4 call writefile(["over","written"], f, "b") | |
5 call writefile(["hello","world"], f, "b") | |
6 call writefile(["!", "good"], f, "a") | |
7 call writefile(["morning"], f, "ab") | |
8 call writefile(["", "vimmers"], f, "ab") | |
9 let l = readfile(f) | |
10 call assert_equal("hello", l[0]) | |
11 call assert_equal("world!", l[1]) | |
12 call assert_equal("good", l[2]) | |
13 call assert_equal("morning", l[3]) | |
14 call assert_equal("vimmers", l[4]) | |
15 call delete(f) | |
16 endfunction |