diff options
author | ZyX <kp-pav@yandex.ru> | 2016-05-15 21:54:13 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-06-10 21:50:50 +0300 |
commit | 6881fcd203a0df156557934caf532cc9baa6aa93 (patch) | |
tree | 240cd38d4270ed61a75752e9cf7712abaaf2fe4b | |
parent | ff470bb853397fcb25bfa5dd952ebb32307b7875 (diff) | |
download | rneovim-6881fcd203a0df156557934caf532cc9baa6aa93.tar.gz rneovim-6881fcd203a0df156557934caf532cc9baa6aa93.tar.bz2 rneovim-6881fcd203a0df156557934caf532cc9baa6aa93.zip |
functests: Do not use setup/teardown where before_/after_each is needed
When skipping these test blocks they may error out:
Error → test/functional/shell/viml_system_spec.lua @ 154
system() with output containing NULs setup
./test/functional/helpers.lua:75: attempt to index upvalue 'session' (a nil value)
stack traceback:
./test/functional/helpers.lua:75: in function 'request'
./test/functional/helpers.lua:166: in function 'nvim_feed'
./test/functional/helpers.lua:195: in function 'feed'
test/functional/shell/viml_system_spec.lua:14: in function <test/functional/shell/viml_system_spec.lua:13>
Error → test/functional/shell/viml_system_spec.lua @ 155
system() with output containing NULs teardown
./test/functional/helpers.lua:75: attempt to index upvalue 'session' (a nil value)
stack traceback:
./test/functional/helpers.lua:75: in function 'eval'
test/functional/shell/viml_system_spec.lua:21: in function <test/functional/shell/viml_system_spec.lua:20>
-rw-r--r-- | test/functional/shell/viml_system_spec.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua index 00b794d25e..3de022cbd9 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/shell/viml_system_spec.lua @@ -151,8 +151,8 @@ describe('system()', function() describe('with output containing NULs', function() local fname = 'Xtest' - setup(create_file_with_nuls(fname)) - teardown(delete_file(fname)) + before_each(create_file_with_nuls(fname)) + after_each(delete_file(fname)) it('replaces NULs by SOH characters', function() eq('part1\001part2\001part3\n', eval('system("cat '..fname..'")')) @@ -310,8 +310,8 @@ describe('systemlist()', function() describe('with output containing NULs', function() local fname = 'Xtest' - setup(create_file_with_nuls(fname)) - teardown(delete_file(fname)) + before_each(create_file_with_nuls(fname)) + after_each(delete_file(fname)) it('replaces NULs by newline characters', function() eq({'part1\npart2\npart3'}, eval('systemlist("cat '..fname..'")')) |