diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-09 08:25:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-09 08:25:08 -0400 |
commit | 8a1a256b44f7fe9f0d878d4d28d7f41f8157c4ea (patch) | |
tree | 5dec7bec10f87f7dc71ddf1d3c7cce4fe8beeb9e /test/functional/eval/writefile_spec.lua | |
parent | 82ac44d01f0e92546f43c804595c14a139af77bd (diff) | |
parent | b35daa986f06f00939ddcf225a5efc59c26c418b (diff) | |
download | rneovim-8a1a256b44f7fe9f0d878d4d28d7f41f8157c4ea.tar.gz rneovim-8a1a256b44f7fe9f0d878d4d28d7f41f8157c4ea.tar.bz2 rneovim-8a1a256b44f7fe9f0d878d4d28d7f41f8157c4ea.zip |
Merge pull request #14326 from janlazo/vim-8.2.0623
vim-patch:8.2.{623,1822,2738}
Diffstat (limited to 'test/functional/eval/writefile_spec.lua')
-rw-r--r-- | test/functional/eval/writefile_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/eval/writefile_spec.lua b/test/functional/eval/writefile_spec.lua index 0bb7523d7e..356680ba7c 100644 --- a/test/functional/eval/writefile_spec.lua +++ b/test/functional/eval/writefile_spec.lua @@ -59,6 +59,16 @@ describe('writefile()', function() eq('\n', read_file(fname)) end) + it('writes list with a null string to a file', function() + eq(0, exc_exec( + ('call writefile([v:_null_string], "%s", "b")'):format( + fname))) + eq('', read_file(fname)) + eq(0, exc_exec(('call writefile([v:_null_string], "%s")'):format( + fname))) + eq('\n', read_file(fname)) + end) + it('appends to a file', function() eq(nil, read_file(fname)) eq(0, funcs.writefile({'abc', 'def', 'ghi'}, fname)) |