From e91afdcda69b408b6f2572e82de3eb0ad4eee0b5 Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Fri, 6 May 2016 19:55:14 -0400 Subject: test/functional: fix a dependency on the previous test suite While trying to debug an issue, I discovered that the tests for illegal arguments depended on the prior suite having run and started a session. Let's remove that unintentional dependency by starting our own session before each test. --- test/functional/ex_cmds/cd_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua index 2c62218d1b..69467632a4 100644 --- a/test/functional/ex_cmds/cd_spec.lua +++ b/test/functional/ex_cmds/cd_spec.lua @@ -111,6 +111,10 @@ end -- Test legal parameters for 'getcwd' and 'haslocaldir' for _, cmd in ipairs {'getcwd', 'haslocaldir'} do describe(cmd..'()', function() + before_each(function() + clear() + end) + -- Test invalid argument types local err474 = 'Vim(call):E474: Invalid argument' it('fails on string', function() -- cgit