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/quickfix_spec.lua | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'test/functional/ui/quickfix_spec.lua') diff --git a/test/functional/ui/quickfix_spec.lua b/test/functional/ui/quickfix_spec.lua index 29b28fe9f0..68dc8b428c 100644 --- a/test/functional/ui/quickfix_spec.lua +++ b/test/functional/ui/quickfix_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, command = helpers.insert, helpers.command describe('quickfix selection highlight', function() @@ -28,8 +28,8 @@ describe('quickfix selection highlight', function() }) meths.set_option('errorformat', '%m %l') - execute('syntax on') - execute('highlight Search guibg=Green') + command('syntax on') + command('highlight Search guibg=Green') insert([[ Line 1 @@ -39,7 +39,7 @@ describe('quickfix selection highlight', function() Line 5 ]]) - execute('cad') + command('cad') feed('gg') screen:expect([[ @@ -57,7 +57,7 @@ describe('quickfix selection highlight', function() end) it('using default Search highlight group', function() - execute('copen') + command('copen') screen:expect([[ Line 1 | @@ -72,7 +72,7 @@ describe('quickfix selection highlight', function() :copen | ]]) - execute('cnext') + command('cnext') screen:expect([[ Line 1 | @@ -89,9 +89,9 @@ describe('quickfix selection highlight', function() end) it('using QuickFixLine highlight group', function() - execute('highlight QuickFixLine guibg=Red') + command('highlight QuickFixLine guibg=Red') - execute('copen') + command('copen') screen:expect([[ Line 1 | @@ -106,7 +106,7 @@ describe('quickfix selection highlight', function() :copen | ]]) - execute('cnext') + command('cnext') screen:expect([[ Line 1 | @@ -123,11 +123,11 @@ describe('quickfix selection highlight', function() end) it('combines with CursorLine', function() - execute('set cursorline') - execute('highlight QuickFixLine guifg=Red') - execute('highlight CursorLine guibg=Fuchsia') + command('set cursorline') + command('highlight QuickFixLine guifg=Red') + command('highlight CursorLine guibg=Fuchsia') - execute('copen') + command('copen') screen:expect([[ {9:Line 1 }| @@ -159,11 +159,11 @@ describe('quickfix selection highlight', function() end) it('QuickFixLine background takes precedence over CursorLine', function() - execute('set cursorline') - execute('highlight QuickFixLine guibg=Red') - execute('highlight CursorLine guibg=Fuchsia') + command('set cursorline') + command('highlight QuickFixLine guibg=Red') + command('highlight CursorLine guibg=Fuchsia') - execute('copen') + command('copen') screen:expect([[ {9:Line 1 }| -- cgit From 0ac2afdec73711d8006d6227fcb1d7b658ccf184 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Apr 2017 03:23:16 +0300 Subject: functests: Fix some ui/*_spec tests --- test/functional/ui/quickfix_spec.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/functional/ui/quickfix_spec.lua') diff --git a/test/functional/ui/quickfix_spec.lua b/test/functional/ui/quickfix_spec.lua index 68dc8b428c..b0d89ee3b6 100644 --- a/test/functional/ui/quickfix_spec.lua +++ b/test/functional/ui/quickfix_spec.lua @@ -52,7 +52,7 @@ describe('quickfix selection highlight', function() {1:~ }| {1:~ }| {1:~ }| - :cad | + | ]]) end) @@ -69,7 +69,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :copen | + | ]]) command('cnext') @@ -84,7 +84,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :cnext | + | ]]) end) @@ -103,7 +103,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :copen | + | ]]) command('cnext') @@ -118,7 +118,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :cnext | + | ]]) end) @@ -139,7 +139,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :copen | + | ]]) feed('j') @@ -154,7 +154,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :copen | + | ]]) end) @@ -175,7 +175,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :copen | + | ]]) feed('j') @@ -190,7 +190,7 @@ describe('quickfix selection highlight', function() |{3:5}| Line | || | {4:[Quickfix List] }| - :copen | + | ]]) end) end) -- cgit