aboutsummaryrefslogtreecommitdiff
path: root/test/unit/helpers.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-12-24 17:13:42 +0300
committerZyX <kp-pav@yandex.ru>2017-12-24 17:13:49 +0300
commit32689aa5bed472ca981f323439b98e0911b403b9 (patch)
tree96bcf96c8f6b9ab77796250a53fa7548dba4f929 /test/unit/helpers.lua
parent67fa9e5237526b092c1ac672504e259db7f14126 (diff)
downloadrneovim-32689aa5bed472ca981f323439b98e0911b403b9.tar.gz
rneovim-32689aa5bed472ca981f323439b98e0911b403b9.tar.bz2
rneovim-32689aa5bed472ca981f323439b98e0911b403b9.zip
unittests: Remove start of trace, not end
Diffstat (limited to 'test/unit/helpers.lua')
-rw-r--r--test/unit/helpers.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua
index b1e709c444..589e026e5f 100644
--- a/test/unit/helpers.lua
+++ b/test/unit/helpers.lua
@@ -690,7 +690,9 @@ local function check_child_err(rd)
break
end
trace[#trace + 1] = traceline
- table.remove(trace, maxtrace + 1)
+ if #trace > maxtrace then
+ table.remove(trace, 1)
+ end
end
local res = sc.read(rd, 2)
if #res ~= 2 then