diff options
Diffstat (limited to 'test/functional/ui/syntax_conceal_spec.lua')
-rw-r--r-- | test/functional/ui/syntax_conceal_spec.lua | 44 |
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 | | |