diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-13 14:12:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 14:12:38 +0100 |
commit | 33d063752182c8dca60ad0bddaaa12a6669eb70b (patch) | |
tree | 4d19b148b4ef692b8c1045f78a5fe3b88c6427ff /src/nvim/testdir/test_writefile.vim | |
parent | 3f555cce3de595902cd003cfca008563bc8ff8da (diff) | |
parent | 76829898bdcbf7f19ea2c6099c45c414510c6a38 (diff) | |
download | rneovim-33d063752182c8dca60ad0bddaaa12a6669eb70b.tar.gz rneovim-33d063752182c8dca60ad0bddaaa12a6669eb70b.tar.bz2 rneovim-33d063752182c8dca60ad0bddaaa12a6669eb70b.zip |
Merge #6268 from lonerover/vim-7.4.2208
vim-patch: 7.4.2208,7.4.2305
Diffstat (limited to 'src/nvim/testdir/test_writefile.vim')
-rw-r--r-- | src/nvim/testdir/test_writefile.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim new file mode 100644 index 0000000000..d820c580ac --- /dev/null +++ b/src/nvim/testdir/test_writefile.vim @@ -0,0 +1,16 @@ + +function! Test_WriteFile() + 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") + let l = readfile(f) + call assert_equal("hello", l[0]) + call assert_equal("world!", l[1]) + call assert_equal("good", l[2]) + call assert_equal("morning", l[3]) + call assert_equal("vimmers", l[4]) + call delete(f) +endfunction |