diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
commit | c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57 (patch) | |
tree | b7e59c416d1435725c65f8952b6e55c70544d97e /test/functional/eval/writefile_spec.lua | |
parent | 62108c3b0be46936c83f6d4c98b44ceb5e6f77fd (diff) | |
parent | 27a577586eace687c47e7398845178208cae524a (diff) | |
download | rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.gz rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.bz2 rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.zip |
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'test/functional/eval/writefile_spec.lua')
-rw-r--r-- | test/functional/eval/writefile_spec.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/eval/writefile_spec.lua b/test/functional/eval/writefile_spec.lua index 3052c616e0..2f84114b9b 100644 --- a/test/functional/eval/writefile_spec.lua +++ b/test/functional/eval/writefile_spec.lua @@ -80,6 +80,13 @@ describe('writefile()', function() eq('a\0\0\0b', read_file(fname)) end) + it('writes with s and S', function() + eq(0, funcs.writefile({'\na\nb\n'}, fname, 'bs')) + eq('\0a\0b\0', read_file(fname)) + eq(0, funcs.writefile({'a\n\n\nb'}, fname, 'bS')) + eq('a\0\0\0b', read_file(fname)) + end) + it('correctly overwrites file', function() eq(0, funcs.writefile({'\na\nb\n'}, fname, 'b')) eq('\0a\0b\0', read_file(fname)) @@ -115,6 +122,8 @@ describe('writefile()', function() eq('\nE729: using Funcref as a String', redir_exec(('call writefile(%s)'):format(args:format('function("tr")')))) end + eq('\nE5060: Unknown flag: «»', + redir_exec(('call writefile([], "%s", "bs«»")'):format(fname))) eq('TEST', read_file(fname)) end) |