From c2826a7830ddba66261afdf45fcf4d0043506342 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 1 Apr 2017 13:08:42 +0200 Subject: 'guicursor': Empty means "block cursor in all modes". Also: update default 'guicursor' to match the documentation. --- test/functional/ui/mouse_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/ui/mouse_spec.lua') diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index b2fbedfb5e..ecbd5642d1 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -6,7 +6,7 @@ local eq, funcs = helpers.eq, helpers.funcs if helpers.pending_win32(pending) then return end -describe('Mouse input', function() +describe('ui/mouse/input', function() local screen before_each(function() -- cgit From 65fb622000af8e3dbb65480e1581758ecf4ba3e2 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Apr 2017 00:12:26 +0300 Subject: functests: Replace execute with either command or feed_command Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed. --- test/functional/ui/mouse_spec.lua | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'test/functional/ui/mouse_spec.lua') diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index ecbd5642d1..35af34015d 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -1,7 +1,7 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear, feed, meths = helpers.clear, helpers.feed, helpers.meths -local insert, execute = helpers.insert, helpers.execute +local insert, feed_command = helpers.insert, helpers.feed_command local eq, funcs = helpers.eq, helpers.funcs if helpers.pending_win32(pending) then return end @@ -123,9 +123,9 @@ describe('ui/mouse/input', function() end) it('in tabline on filler space moves tab to the end', function() - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -160,9 +160,9 @@ describe('ui/mouse/input', function() return end - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -190,9 +190,9 @@ describe('ui/mouse/input', function() end) it('in tabline to the right moves tab right', function() - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -220,9 +220,9 @@ describe('ui/mouse/input', function() end) it('out of tabline under filler space moves tab to the end', function() - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -265,9 +265,9 @@ describe('ui/mouse/input', function() return end - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -303,9 +303,9 @@ describe('ui/mouse/input', function() end) it('out of tabline to the right moves tab right', function() - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -352,9 +352,9 @@ describe('ui/mouse/input', function() end) it('left click in default tabline (position 4) switches to tab', function() - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -375,9 +375,9 @@ describe('ui/mouse/input', function() it('left click in default tabline (position 24) closes tab', function() meths.set_option('hidden', true) - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -398,9 +398,9 @@ describe('ui/mouse/input', function() it('double click in default tabline (position 4) opens new tab', function() meths.set_option('hidden', true) - execute('%delete') + feed_command('%delete') insert('this is foo') - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') screen:expect([[ {tab: + foo }{sel: + bar }{fill: }{tab:X}| @@ -421,13 +421,13 @@ describe('ui/mouse/input', function() describe('%@ label', function() before_each(function() - execute([[ + feed_command([[ function Test(...) let g:reply = a:000 return copy(a:000) " Check for memory leaks: return should be freed endfunction ]]) - execute([[ + feed_command([[ function Test2(...) return call('Test', a:000 + [2]) endfunction @@ -533,9 +533,9 @@ describe('ui/mouse/input', function() fill = { reverse=true }, vis = { background=Screen.colors.LightGrey } }) - execute('silent file foo | tabnew | file bar') + feed_command('silent file foo | tabnew | file bar') insert('this is bar') - execute('tabprevious') -- go to first tab + feed_command('tabprevious') -- go to first tab screen:expect([[ {sel: + foo }{tab: + bar }{fill: }{tab:X}| mouse | @@ -641,7 +641,7 @@ describe('ui/mouse/input', function() mouse scrolling ]]) screen:try_resize(53, 14) - execute('sp', 'vsp') + feed_command('sp', 'vsp') screen:expect([[ lines {4:|}lines | to {4:|}to | @@ -754,12 +754,12 @@ describe('ui/mouse/input', function() }) feed('ggdG') - execute('set concealcursor=n') - execute('set nowrap') - execute('syntax match NonText "\\" conceal') - execute('syntax match NonText "\\cs\\|g." conceal cchar=X') - execute('syntax match NonText "\\%(lo\\|cl\\)." conceal') - execute('syntax match NonText "Lo" conceal cchar=Y') + feed_command('set concealcursor=n') + feed_command('set nowrap') + feed_command('syntax match NonText "\\" conceal') + feed_command('syntax match NonText "\\cs\\|g." conceal cchar=X') + feed_command('syntax match NonText "\\%(lo\\|cl\\)." conceal') + feed_command('syntax match NonText "Lo" conceal cchar=Y') insert([[ Lorem ipsum dolor sit amet, consetetur sadipscing elitr. @@ -770,7 +770,7 @@ describe('ui/mouse/input', function() end) it('(level 1) click on non-wrapped lines', function() - execute('let &conceallevel=1', 'echo') + feed_command('let &conceallevel=1', 'echo') feed('<0,0>') screen:expect([[ @@ -818,7 +818,7 @@ describe('ui/mouse/input', function() end) -- level 1 - non wrapped it('(level 1) click on wrapped lines', function() - execute('let &conceallevel=1', 'let &wrap=1', 'echo') + feed_command('let &conceallevel=1', 'let &wrap=1', 'echo') feed('<0,0>') screen:expect([[ @@ -867,7 +867,7 @@ describe('ui/mouse/input', function() it('(level 2) click on non-wrapped lines', function() - execute('let &conceallevel=2', 'echo') + feed_command('let &conceallevel=2', 'echo') feed('<0,0>') screen:expect([[ @@ -915,7 +915,7 @@ describe('ui/mouse/input', function() end) -- level 2 - non wrapped it('(level 2) click on wrapped lines', function() - execute('let &conceallevel=2', 'let &wrap=1', 'echo') + feed_command('let &conceallevel=2', 'let &wrap=1', 'echo') feed('<0,0>') screen:expect([[ @@ -964,7 +964,7 @@ describe('ui/mouse/input', function() it('(level 3) click on non-wrapped lines', function() - execute('let &conceallevel=3', 'echo') + feed_command('let &conceallevel=3', 'echo') feed('<0,0>') screen:expect([[ @@ -1012,7 +1012,7 @@ describe('ui/mouse/input', function() end) -- level 3 - non wrapped it('(level 3) click on wrapped lines', function() - execute('let &conceallevel=3', 'let &wrap=1', 'echo') + feed_command('let &conceallevel=3', 'let &wrap=1', 'echo') feed('<0,0>') screen:expect([[ -- cgit From d72db1ac8f3a2eeea31b2679e7b3ace5b7b21ddd Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 15 Jul 2017 18:00:00 +0200 Subject: test: mouse_spec: remove obnoxious wait times (#7029) helpers.skip_fragile() already skips the problematic tests on the ASan build. But the 15s timeout plus 5s 'mousetime' cause the tests to take 1+ minutes anyways. --- test/functional/ui/mouse_spec.lua | 4 ---- 1 file changed, 4 deletions(-) (limited to 'test/functional/ui/mouse_spec.lua') diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index 35af34015d..3daf92eea0 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -13,9 +13,6 @@ describe('ui/mouse/input', function() clear() meths.set_option('mouse', 'a') meths.set_option('listchars', 'eol:$') - -- set mousetime to very high value to ensure that even in valgrind/travis, - -- nvim will still pick multiple clicks - meths.set_option('mousetime', 5000) screen = Screen.new(25, 5) screen:attach() screen:set_default_attr_ids({ @@ -119,7 +116,6 @@ describe('ui/mouse/input', function() sel = { bold=true }, fill = { reverse=true } }) - screen.timeout = 15000 end) it('in tabline on filler space moves tab to the end', function() -- cgit