diff options
Diffstat (limited to 'test/command_callback/test_phpstan_command_callbacks.vader')
-rw-r--r-- | test/command_callback/test_phpstan_command_callbacks.vader | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/command_callback/test_phpstan_command_callbacks.vader b/test/command_callback/test_phpstan_command_callbacks.vader index 0216b281..813fe448 100644 --- a/test/command_callback/test_phpstan_command_callbacks.vader +++ b/test/command_callback/test_phpstan_command_callbacks.vader @@ -1,11 +1,24 @@ Before: - call delete('./phpstan.neon') call ale#assert#SetUpLinterTest('php', 'phpstan') + let g:old_dir = g:dir + + " Create a temporary directory and work within it, otherwise these tests + " cannot be run in parallel. + let g:dir = tempname() + call mkdir(g:dir, '', 0750) + silent! execute 'cd ' . fnameescape(g:dir) + silent! noautocmd execute 'file ' . fnameescape(ale#path#Simplify(g:dir . '/test.php')) + + call delete('./phpstan.neon') + GivenCommandOutput ['0.10.2'] After: - call delete('./phpstan.neon') + silent! execute 'cd ' . fnameescape(g:old_dir) + call delete(g:dir, 'rf') + let g:dir = g:old_dir + unlet! g:old_dir call ale#assert#TearDownLinterTest() Execute(Custom executables should be used for the executable and command): |