aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/069_multibyte_formatting_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/069_multibyte_formatting_spec.lua')
-rw-r--r--test/functional/legacy/069_multibyte_formatting_spec.lua44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/functional/legacy/069_multibyte_formatting_spec.lua b/test/functional/legacy/069_multibyte_formatting_spec.lua
index 6edcd8b7f2..38ca25d57a 100644
--- a/test/functional/legacy/069_multibyte_formatting_spec.lua
+++ b/test/functional/legacy/069_multibyte_formatting_spec.lua
@@ -4,8 +4,8 @@
-- Also test byteidx() and byteidxcomp()
local helpers = require('test.functional.helpers')(after_each)
-local feed, insert, eq, eval, clear, execute, expect = helpers.feed,
- helpers.insert, helpers.eq, helpers.eval, helpers.clear, helpers.execute,
+local feed, insert, eq, eval, clear, feed_command, expect = helpers.feed,
+ helpers.insert, helpers.eq, helpers.eval, helpers.clear, helpers.feed_command,
helpers.expect
describe('multibyte text', function()
@@ -17,8 +17,8 @@ describe('multibyte text', function()
XYZ
abc XYZ
}]])
- execute('/^{/+1')
- execute('set tw=2 fo=t')
+ feed_command('/^{/+1')
+ feed_command('set tw=2 fo=t')
feed('gqgqjgqgqo<cr>')
feed('XYZ<cr>')
feed('abc XYZ<esc><esc>')
@@ -43,8 +43,8 @@ describe('multibyte text', function()
XY
X Y
}]])
- execute('/^{/+1')
- execute('set tw=1 fo=tm')
+ feed_command('/^{/+1')
+ feed_command('set tw=1 fo=tm')
feed('gqgqjgqgqjgqgqjgqgqjgqgqo<cr>')
feed('X<cr>')
feed('Xa<cr>')
@@ -89,8 +89,8 @@ describe('multibyte text', function()
abX c
abXY
}]])
- execute('/^{/+1')
- execute('set tw=2 fo=tm')
+ feed_command('/^{/+1')
+ feed_command('set tw=2 fo=tm')
feed('gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo<cr>')
feed('X<cr>')
feed('Xa<cr>')
@@ -156,8 +156,8 @@ describe('multibyte text', function()
Xa
}]])
- execute('/^{/+1')
- execute('set ai tw=2 fo=tm')
+ feed_command('/^{/+1')
+ feed_command('set ai tw=2 fo=tm')
feed('gqgqjgqgqo<cr>')
feed('X<cr>')
feed('Xa<esc>')
@@ -179,8 +179,8 @@ describe('multibyte text', function()
Xa
}]])
- execute('/^{/+1')
- execute('set noai tw=2 fo=tm')
+ feed_command('/^{/+1')
+ feed_command('set noai tw=2 fo=tm')
feed('gqgqjgqgqo<cr>')
-- Literal spaces will be trimmed from the by feed().
feed('<space><space>X<cr>')
@@ -211,8 +211,8 @@ describe('multibyte text', function()
XXa
XXY
}]])
- execute('/^{/+1')
- execute('set tw=2 fo=cqm comments=n:X')
+ feed_command('/^{/+1')
+ feed_command('set tw=2 fo=cqm comments=n:X')
feed('gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo<cr>')
feed('X<cr>')
feed('Xa<cr>')
@@ -261,8 +261,8 @@ describe('multibyte text', function()
{
}]])
- execute('/^{/+1')
- execute('set tw=2 fo=tm')
+ feed_command('/^{/+1')
+ feed_command('set tw=2 fo=tm')
feed('RXa<esc>')
expect([[
{
@@ -276,8 +276,8 @@ describe('multibyte text', function()
{
‘ two three ’ four
}]])
- execute('/^{/+1')
- execute('set mps+=‘:’')
+ feed_command('/^{/+1')
+ feed_command('set mps+=‘:’')
feed('d%<cr>')
expect([[
{
@@ -299,8 +299,8 @@ describe('multibyte text', function()
insert([[
á
x]])
- execute('set whichwrap+=h')
- execute('/^x')
+ feed_command('set whichwrap+=h')
+ feed_command('/^x')
feed('dh')
expect([[
áx]])
@@ -308,9 +308,9 @@ describe('multibyte text', function()
it('can be queried with byteidx() and byteidxcomp()', function()
-- One char of two bytes.
- execute("let a = '.é.'")
+ feed_command("let a = '.é.'")
-- Normal e with composing char.
- execute("let b = '.é.'")
+ feed_command("let b = '.é.'")
eq(0, eval('byteidx(a, 0)'))
eq(1, eval('byteidx(a, 1)'))
eq(3, eval('byteidx(a, 2)'))