diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-24 17:13:42 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-24 17:13:49 +0300 |
commit | 32689aa5bed472ca981f323439b98e0911b403b9 (patch) | |
tree | 96bcf96c8f6b9ab77796250a53fa7548dba4f929 /test/unit/helpers.lua | |
parent | 67fa9e5237526b092c1ac672504e259db7f14126 (diff) | |
download | rneovim-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.lua | 4 |
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 |