aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/syntax_conceal_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r--test/functional/ui/syntax_conceal_spec.lua70
1 files changed, 35 insertions, 35 deletions
diff --git a/test/functional/ui/syntax_conceal_spec.lua b/test/functional/ui/syntax_conceal_spec.lua
index ee3e4fa32a..28a104360d 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()
@@ -52,7 +52,7 @@ describe('Screen', function()
^ |
{0:~ }|
{0:~ }|
- :syn match dAmpersand '[&][&]' conceal cchar=∧ |
+ |
]])
end)
@@ -68,7 +68,7 @@ describe('Screen', function()
|
{0:~ }|
{0:~ }|
- :syn match dAmpersand '[&][&]' conceal cchar=∧ |
+ |
]])
end)
@@ -84,7 +84,7 @@ describe('Screen', function()
|
{0:~ }|
{0:~ }|
- :syn match dAmpersand '[&][&]' conceal cchar=∧ |
+ |
]])
end)
@@ -100,7 +100,7 @@ describe('Screen', function()
|
{0:~ }|
{0:~ }|
- :syn match dAmpersand '[&][&]' conceal cchar=∧ |
+ |
]])
end)
@@ -116,15 +116,15 @@ describe('Screen', function()
^ |
{0:~ }|
{0:~ }|
- :syn match dAmpersand '[&][&]' conceal cchar=∧ |
+ |
]])
end)
end) -- multiple
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:λ} |
@@ -135,7 +135,7 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :syn keyword kLambda lambda conceal cchar=λ |
+ |
]])
end) -- Keyword
@@ -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()
@@ -218,15 +218,15 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :syn region rText start='<r>' end='</r>' cchar=- |
+ |
]])
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:-} |
@@ -237,10 +237,10 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{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:-} |
@@ -251,7 +251,7 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :syn region iText start='<i>' end='</i>' cchar=* |
+ |
]])
end)
end) -- a region of text (implicit concealing)
@@ -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" |
@@ -279,12 +279,12 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :let &conceallevel=0 |
+ |
]])
end)
it("1. Conceal using cchar or reference listchars.", function()
- execute("let &conceallevel=1")
+ command("let &conceallevel=1")
screen:expect([[
// No Conceal |
{1: } |
@@ -295,12 +295,12 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :let &conceallevel=1 |
+ |
]])
end)
it("2. Hidden unless cchar is set.", function()
- execute("let &conceallevel=2")
+ command("let &conceallevel=2")
screen:expect([[
// No Conceal |
|
@@ -311,12 +311,12 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :let &conceallevel=2 |
+ |
]])
end)
it("3. Hide all concealed text.", function()
- execute("let &conceallevel=3")
+ command("let &conceallevel=3")
screen:expect([[
// No Conceal |
|
@@ -327,7 +327,7 @@ describe('Screen', function()
{0:~ }|
{0:~ }|
{0:~ }|
- :let &conceallevel=3 |
+ |
]])
end)
end) -- conceallevel