diff options
author | ZyX <kp-pav@yandex.ru> | 2017-03-05 04:02:45 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-11 23:23:30 +0300 |
commit | 12b062b2c862fd436cff0df4ebb2e5ca22e75e19 (patch) | |
tree | 47cb394b68714d419728e7aca87b9bac909df96f /test/unit/eval/tricks_spec.lua | |
parent | 5898b42d82a5a4b594879f30d84611c98ce6bd54 (diff) | |
download | rneovim-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/eval/tricks_spec.lua')
-rw-r--r-- | test/unit/eval/tricks_spec.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/eval/tricks_spec.lua b/test/unit/eval/tricks_spec.lua index 4c5184995c..ff63dc5cde 100644 --- a/test/unit/eval/tricks_spec.lua +++ b/test/unit/eval/tricks_spec.lua @@ -1,4 +1,5 @@ local helpers = require('test.unit.helpers') +local itp = helpers.gen_itp(it) local cimport = helpers.cimport local to_cstr = helpers.to_cstr @@ -15,7 +16,7 @@ local eval_expr = function(expr) end describe('NULL typval_T', function() - it('is produced by $XXX_UNEXISTENT_VAR_XXX', function() + itp('is produced by $XXX_UNEXISTENT_VAR_XXX', function() -- Required for various tests which need to check whether typval_T with NULL -- string works correctly. This test checks that unexistent environment -- variable produces NULL string, not that some specific environment @@ -29,13 +30,13 @@ describe('NULL typval_T', function() eq(nil, rettv.vval.v_string) end) - it('is produced by v:_null_list', function() + itp('is produced by v:_null_list', function() local rettv = eval_expr('v:_null_list') eq(eval.VAR_LIST, rettv.v_type) eq(nil, rettv.vval.v_list) end) - it('is produced by v:_null_dict', function() + itp('is produced by v:_null_dict', function() local rettv = eval_expr('v:_null_dict') eq(eval.VAR_DICT, rettv.v_type) eq(nil, rettv.vval.v_dict) |