aboutsummaryrefslogtreecommitdiff
path: root/test/unit/memory_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/memory_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/memory_spec.lua')
-rw-r--r--test/unit/memory_spec.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/memory_spec.lua b/test/unit/memory_spec.lua
index 73a32724ef..744ff3cf19 100644
--- a/test/unit/memory_spec.lua
+++ b/test/unit/memory_spec.lua
@@ -1,4 +1,5 @@
local helpers = require("test.unit.helpers")
+local itp = helpers.gen_itp(it)
local cimport = helpers.cimport
local cstr = helpers.cstr
@@ -26,7 +27,7 @@ describe('xstrlcat()', function()
return ffi.string(dst_cstr)
end
- it('concatenates strings', function()
+ itp('concatenates strings', function()
eq('ab', test_xstrlcat('a', 'b', 3))
eq('ab', test_xstrlcat('a', 'b', 4096))
eq('ABCיהZdefgiיהZ', test_xstrlcat('ABCיהZ', 'defgiיהZ', 4096))
@@ -34,7 +35,7 @@ describe('xstrlcat()', function()
eq('a', test_xstrlcat('a', '', 4096))
end)
- it('concatenates overlapping strings', function()
+ itp('concatenates overlapping strings', function()
eq('abcabc', test_xstrlcat_overlap('abc', 0, 7))
eq('abca', test_xstrlcat_overlap('abc', 0, 5))
eq('abcb', test_xstrlcat_overlap('abc', 1, 5))
@@ -42,7 +43,7 @@ describe('xstrlcat()', function()
eq('abcabc', test_xstrlcat_overlap('abc', 0, 2343))
end)
- it('truncates if `dsize` is too small', function()
+ itp('truncates if `dsize` is too small', function()
eq('a', test_xstrlcat('a', 'b', 2))
eq('', test_xstrlcat('', 'b', 1))
eq('ABCיהZd', test_xstrlcat('ABCיהZ', 'defgiיהZ', 10))