diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-12-10 02:18:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-10 02:18:15 +0100 |
commit | 7c513d646d87eb3e4ed4917d5a3a7b9163371fae (patch) | |
tree | badf3d0cad34dc28ecd1d87b9f7b38843677021d /test/unit | |
parent | 5082af415f762e5f5974214e32deff883141bfc2 (diff) | |
parent | 4abe9afbf67cec620fde9e47cb3df92f60e1cca9 (diff) | |
download | rneovim-7c513d646d87eb3e4ed4917d5a3a7b9163371fae.tar.gz rneovim-7c513d646d87eb3e4ed4917d5a3a7b9163371fae.tar.bz2 rneovim-7c513d646d87eb3e4ed4917d5a3a7b9163371fae.zip |
Merge #5396 from justinmk/tui-throttle
throttle shell output to maintain responsiveness
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/multiqueue_spec.lua (renamed from test/unit/queue_spec.lua) | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/queue_spec.lua b/test/unit/multiqueue_spec.lua index d802367835..c7f8dd8328 100644 --- a/test/unit/queue_spec.lua +++ b/test/unit/multiqueue_spec.lua @@ -36,6 +36,27 @@ describe("multiqueue (multi-level event-queue)", function() put(child3, 'c3i2') end) + it('keeps count of added events', function() + eq(3, multiqueue.multiqueue_size(child1)) + eq(4, multiqueue.multiqueue_size(child2)) + eq(2, multiqueue.multiqueue_size(child3)) + end) + + it('keeps count of removed events', function() + multiqueue.multiqueue_get(child1) + eq(2, multiqueue.multiqueue_size(child1)) + multiqueue.multiqueue_get(child1) + eq(1, multiqueue.multiqueue_size(child1)) + multiqueue.multiqueue_get(child1) + eq(0, multiqueue.multiqueue_size(child1)) + put(child1, 'c2ixx') + eq(1, multiqueue.multiqueue_size(child1)) + multiqueue.multiqueue_get(child1) + eq(0, multiqueue.multiqueue_size(child1)) + multiqueue.multiqueue_get(child1) + eq(0, multiqueue.multiqueue_size(child1)) + end) + it('removing from parent removes from child', function() eq('c1i1', get(parent)) eq('c1i2', get(parent)) |