aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/015_alignment_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/legacy/015_alignment_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/legacy/015_alignment_spec.lua')
-rw-r--r--test/functional/legacy/015_alignment_spec.lua30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/functional/legacy/015_alignment_spec.lua b/test/functional/legacy/015_alignment_spec.lua
index 48d4042ff2..8423aa3d11 100644
--- a/test/functional/legacy/015_alignment_spec.lua
+++ b/test/functional/legacy/015_alignment_spec.lua
@@ -4,7 +4,7 @@
local helpers = require('test.functional.helpers')(after_each)
local feed, insert = helpers.feed, helpers.insert
-local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
+local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect
describe('alignment', function()
setup(clear)
@@ -19,7 +19,7 @@ describe('alignment', function()
asdfa a
xasdfa a
asxxdfa a
-
+
test for :center
a a
fa afd asdf
@@ -28,7 +28,7 @@ describe('alignment', function()
asdfa a
xasdfa asdfasdfasdfasdfasdf
asxxdfa a
-
+
test for :right
a a
fa a
@@ -111,34 +111,34 @@ describe('alignment', function()
asxxdfa axxxoikey
asxa;ofa axxxoikey
asdfaqwer axxxoikey
-
+
xxxxx xx xxxxxx
xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx
xxxxxxxxxxxxxxxxxx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx
xx xxxxxxx. xxxx xxxx.
-
+
> xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx
> xxxxxx xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxxxxxx
-
+
aa aa aa aa
bb bb bb bb
cc cc cc cc]])
- execute('set tw=65')
+ feed_command('set tw=65')
feed([[:/^\s*test for :left/,/^\s*test for :center/ left<cr>]])
feed([[:/^\s*test for :center/,/^\s*test for :right/ center<cr>]])
feed([[:/^\s*test for :right/,/^xxx/-1 right<cr>]])
- execute('set fo+=tcroql tw=72')
+ feed_command('set fo+=tcroql tw=72')
feed('/xxxxxxxx$<cr>')
feed('0gq6kk<cr>')
-- Undo/redo here to make the next undo only work on the following changes.
feed('u<cr>')
- execute('map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq')
- execute('/^aa')
+ feed_command('map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq')
+ feed_command('/^aa')
feed('ggu<cr>')
-- Assert buffer contents.
@@ -151,7 +151,7 @@ describe('alignment', function()
asdfa a
xasdfa a
asxxdfa a
-
+
test for :center
a a
fa afd asdf
@@ -160,7 +160,7 @@ describe('alignment', function()
asdfa a
xasdfa asdfasdfasdfasdfasdf
asxxdfa a
-
+
test for :right
a a
fa a
@@ -243,14 +243,14 @@ describe('alignment', function()
asxxdfa axxxoikey
asxa;ofa axxxoikey
asdfaqwer axxxoikey
-
+
xxxxx xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx
xxxxxxxxxxxxxxxxxx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx xx xxxxxxx.
xxxx xxxx.
-
+
> xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx xxxxxx
> xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxxxxxx
-
+
aa aa aa aa
bb bb bb bb
cc cc cc cc]])