diff options
author | w0rp <devw0rp@gmail.com> | 2019-05-13 14:00:12 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-05-13 14:00:12 +0100 |
commit | c88ebc5e70852c9571aa7a94b5eb28df000d693a (patch) | |
tree | 9d55899442fb5d5f27bf547cbe11f678b43bd5ff /test/command_callback | |
parent | 42cbff29f8613729cfd9c26db9ed55a0bf484f2c (diff) | |
download | ale-c88ebc5e70852c9571aa7a94b5eb28df000d693a.zip |
Make phpstan tests fail less
Diffstat (limited to 'test/command_callback')
-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): |