diff options
author | Said Al Attrach <alattrach.said@yahoo.com> | 2019-03-30 18:14:20 +0100 |
---|---|---|
committer | Said Al Attrach <alattrach.said@yahoo.com> | 2019-03-30 18:14:20 +0100 |
commit | 2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b (patch) | |
tree | 6ba61785950dc655ad3c6ec05907eeb5b85d5d3a /test/functional/core/fileio_spec.lua | |
parent | a9df3fa5d2ee41b165b1e740fe27eddbf9dbf4a5 (diff) | |
download | rneovim-2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b.tar.gz rneovim-2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b.tar.bz2 rneovim-2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b.zip |
test: move trim to global helpers
Diffstat (limited to 'test/functional/core/fileio_spec.lua')
-rw-r--r-- | test/functional/core/fileio_spec.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index 94d9536bfc..6468aa9d0a 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -11,6 +11,7 @@ local retry = helpers.retry local rmdir = helpers.rmdir local sleep = helpers.sleep local read_file = helpers.read_file +local trim = helpers.trim describe('fileio', function() before_each(function() @@ -79,11 +80,11 @@ describe('fileio', function() feed('Abar<esc>') command('write') - local foo_contents = read_file('Xtest_startup_file1') - local bar_contents = read_file('Xtest_startup_file1~') + local foobar_contents = trim(read_file('Xtest_startup_file1')) + local bar_contents = trim(read_file('Xtest_startup_file1~')) - eq('foobar\n', foo_contents); - eq('foo\n', bar_contents); + eq('foobar', foobar_contents); + eq('foo', bar_contents); end) end) |