From 0b4054e043257137ccfd3b2207da48910ce32a5f Mon Sep 17 00:00:00 2001 From: ZyX Date: Thu, 30 Nov 2017 11:44:48 +0300 Subject: unittests: Reduce memory used by vim_str2nr test --- test/unit/helpers.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/unit/helpers.lua') diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index c26b1c1bcb..b1e709c444 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -675,6 +675,7 @@ end local function check_child_err(rd) local trace = {} local did_traceline = false + local maxtrace = tonumber(os.getenv('NVIM_TEST_MAXTRACE')) or 1024 while true do local traceline = sc.read(rd, hook_msglen) if #traceline ~= hook_msglen then @@ -689,6 +690,7 @@ local function check_child_err(rd) break end trace[#trace + 1] = traceline + table.remove(trace, maxtrace + 1) end local res = sc.read(rd, 2) if #res ~= 2 then -- cgit