aboutsummaryrefslogtreecommitdiff
path: root/test/unit/api/private_helpers_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-03-05 04:02:45 +0300
committerZyX <kp-pav@yandex.ru>2017-03-11 23:23:30 +0300
commit12b062b2c862fd436cff0df4ebb2e5ca22e75e19 (patch)
tree47cb394b68714d419728e7aca87b9bac909df96f /test/unit/api/private_helpers_spec.lua
parent5898b42d82a5a4b594879f30d84611c98ce6bd54 (diff)
downloadrneovim-12b062b2c862fd436cff0df4ebb2e5ca22e75e19.tar.gz
rneovim-12b062b2c862fd436cff0df4ebb2e5ca22e75e19.tar.bz2
rneovim-12b062b2c862fd436cff0df4ebb2e5ca22e75e19.zip
unittests: Run all unit tests in their own processes
Used sed -r -i -e '/ helpers =/ s/$/\nlocal itp = helpers.gen_itp(it)/; s/^(\s*)it\(/\1itp(/' test/unit/**/*_spec.lua to alter all tests. Locally they all run fine now. Reasoning: 1. General: state from one test should not affect other tests. 2. Local: travis build is failing with something which may be an output of garbage collector. This should prevent state of the garbage collector from interferring as well.
Diffstat (limited to 'test/unit/api/private_helpers_spec.lua')
-rw-r--r--test/unit/api/private_helpers_spec.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/unit/api/private_helpers_spec.lua b/test/unit/api/private_helpers_spec.lua
index 8c54ea6a2a..eb88f486f6 100644
--- a/test/unit/api/private_helpers_spec.lua
+++ b/test/unit/api/private_helpers_spec.lua
@@ -1,4 +1,5 @@
local helpers = require('test.unit.helpers')
+local itp = helpers.gen_itp(it)
local eval_helpers = require('test.unit.eval.helpers')
local api_helpers = require('test.unit.api.helpers')
@@ -25,7 +26,7 @@ describe('vim_to_object', function()
end
local different_output_test = function(name, input, output)
- it(name, function()
+ itp(name, function()
eq(output, vim_to_object(input))
end)
end
@@ -76,19 +77,19 @@ describe('vim_to_object', function()
different_output_test('outputs nil for nested lists (2 level, in dict)',
lst3, {{lst=nil_value}, true, false, 'ttest'})
- it('outputs empty list for NULL list', function()
+ itp('outputs empty list for NULL list', function()
local tt = typvalt('VAR_LIST', {v_list=NULL})
eq(nil, tt.vval.v_list)
eq({[type_key]=list_type}, obj2lua(api.vim_to_object(tt)))
end)
- it('outputs empty dict for NULL dict', function()
+ itp('outputs empty dict for NULL dict', function()
local tt = typvalt('VAR_DICT', {v_dict=NULL})
eq(nil, tt.vval.v_dict)
eq({}, obj2lua(api.vim_to_object(tt)))
end)
- it('regression: partials in a list', function()
+ itp('regression: partials in a list', function()
local llist = {
{
[type_key]=func_type,