mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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>
This commit is contained in:
parent
ff470bb853
commit
6881fcd203
@ -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..'")'))
|
||||
|
Loading…
Reference in New Issue
Block a user