aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/syntax_conceal_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-04-09 00:12:26 +0300
committerZyX <kp-pav@yandex.ru>2017-04-09 03:24:08 +0300
commit65fb622000af8e3dbb65480e1581758ecf4ba3e2 (patch)
tree7d83429d3762b1f0a44d04eb8fc780eedc0ec049 /test/functional/ui/syntax_conceal_spec.lua
parent9158cc171f46ebae0a0d3d1721aa5b7d829bcba5 (diff)
downloadrneovim-65fb622000af8e3dbb65480e1581758ecf4ba3e2.tar.gz
rneovim-65fb622000af8e3dbb65480e1581758ecf4ba3e2.tar.bz2
rneovim-65fb622000af8e3dbb65480e1581758ecf4ba3e2.zip
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.
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r--test/functional/ui/syntax_conceal_spec.lua44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/functional/ui/syntax_conceal_spec.lua b/test/functional/ui/syntax_conceal_spec.lua
index ee3e4fa32a..991443a2ea 100644
--- a/test/functional/ui/syntax_conceal_spec.lua
+++ b/test/functional/ui/syntax_conceal_spec.lua
@@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
-local clear, feed, execute = helpers.clear, helpers.feed, helpers.execute
+local clear, feed, command = helpers.clear, helpers.feed, helpers.command
local insert = helpers.insert
if helpers.pending_win32(pending) then return end
@@ -25,7 +25,7 @@ describe('Screen', function()
describe("match and conceal", function()
before_each(function()
- execute("let &conceallevel=1")
+ command("let &conceallevel=1")
end)
describe("multiple", function()
@@ -38,7 +38,7 @@ describe('Screen', function()
&&
&&
]])
- execute("syn match dAmpersand '[&][&]' conceal cchar=∧")
+ command("syn match dAmpersand '[&][&]' conceal cchar=∧")
end)
it("double characters.", function()
@@ -123,8 +123,8 @@ describe('Screen', function()
it("keyword instances in initially in the document.", function()
feed("2ilambda<cr><ESC>")
- execute("let &conceallevel=1")
- execute("syn keyword kLambda lambda conceal cchar=λ")
+ command("let &conceallevel=1")
+ command("syn keyword kLambda lambda conceal cchar=λ")
screen:expect([[
{1:λ} |
{1:λ} |
@@ -144,11 +144,11 @@ describe('Screen', function()
before_each(function()
feed("2")
insert("<r> a region of text </r>\n")
- execute("let &conceallevel=1")
+ command("let &conceallevel=1")
end)
it('initially and conceal it.', function()
- execute("syn region rText start='<r>' end='</r>' conceal cchar=R")
+ command("syn region rText start='<r>' end='</r>' conceal cchar=R")
screen:expect([[
{1:R} |
{1:R} |
@@ -166,7 +166,7 @@ describe('Screen', function()
it('initially and conceal its start tag and end tag.', function()
-- concealends has a known bug (todo.txt) where the first match won't
-- be replaced with cchar.
- execute("syn region rText matchgroup=rMatch start='<r>' end='</r>' concealends cchar=-")
+ command("syn region rText matchgroup=rMatch start='<r>' end='</r>' concealends cchar=-")
screen:expect([[
{1: } a region of text {1:-} |
{1: } a region of text {1:-} |
@@ -182,7 +182,7 @@ describe('Screen', function()
end)
it('that are nested and conceal the nested region\'s start and end tags.', function()
- execute("syn region rText contains=rText matchgroup=rMatch start='<r>' end='</r>' concealends cchar=-")
+ command("syn region rText contains=rText matchgroup=rMatch start='<r>' end='</r>' concealends cchar=-")
insert("<r> A region with <r> a nested <r> nested region.</r> </r> </r>\n")
screen:expect([[
{1: } a region of text {1:-} |
@@ -201,10 +201,10 @@ describe('Screen', function()
describe("a region of text", function()
before_each(function()
- execute("syntax conceal on")
+ command("syntax conceal on")
feed("2")
insert("<r> a region of text </r>\n")
- execute("syn region rText start='<r>' end='</r>' cchar=-")
+ command("syn region rText start='<r>' end='</r>' cchar=-")
end)
it("and turn on implicit concealing", function()
@@ -223,10 +223,10 @@ describe('Screen', function()
end)
it("and then turn on, then off, and then back on implicit concealing.", function()
- execute("syntax conceal off")
+ command("syntax conceal off")
feed("2")
insert("<i> italian text </i>\n")
- execute("syn region iText start='<i>' end='</i>' cchar=*")
+ command("syn region iText start='<i>' end='</i>' cchar=*")
screen:expect([[
{1:-} |
{1:-} |
@@ -239,8 +239,8 @@ describe('Screen', function()
{0:~ }|
:syn region iText start='<i>' end='</i>' cchar=* |
]])
- execute("syntax conceal on")
- execute("syn region iText start='<i>' end='</i>' cchar=*")
+ command("syntax conceal on")
+ command("syn region iText start='<i>' end='</i>' cchar=*")
screen:expect([[
{1:-} |
{1:-} |
@@ -262,13 +262,13 @@ describe('Screen', function()
insert("// No Conceal\n")
insert('"Conceal without a cchar"\n')
insert("+ With cchar\n\n")
- execute("syn match noConceal '^//.*$'")
- execute("syn match concealNoCchar '\".\\{-}\"$' conceal")
- execute("syn match concealWCchar '^+.\\{-}$' conceal cchar=C")
+ command("syn match noConceal '^//.*$'")
+ command("syn match concealNoCchar '\".\\{-}\"$' conceal")
+ command("syn match concealWCchar '^+.\\{-}$' conceal cchar=C")
end)
it("0. No concealing.", function()
- execute("let &conceallevel=0")
+ command("let &conceallevel=0")
screen:expect([[
// No Conceal |
"Conceal without a cchar" |
@@ -284,7 +284,7 @@ describe('Screen', function()
end)
it("1. Conceal using cchar or reference listchars.", function()
- execute("let &conceallevel=1")
+ command("let &conceallevel=1")
screen:expect([[
// No Conceal |
{1: } |
@@ -300,7 +300,7 @@ describe('Screen', function()
end)
it("2. Hidden unless cchar is set.", function()
- execute("let &conceallevel=2")
+ command("let &conceallevel=2")
screen:expect([[
// No Conceal |
|
@@ -316,7 +316,7 @@ describe('Screen', function()
end)
it("3. Hide all concealed text.", function()
- execute("let &conceallevel=3")
+ command("let &conceallevel=3")
screen:expect([[
// No Conceal |
|