aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/033_lisp_indent_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/033_lisp_indent_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/033_lisp_indent_spec.lua')
-rw-r--r--test/functional/legacy/033_lisp_indent_spec.lua27
1 files changed, 14 insertions, 13 deletions
diff --git a/test/functional/legacy/033_lisp_indent_spec.lua b/test/functional/legacy/033_lisp_indent_spec.lua
index b4abb02ac2..2b79ee024b 100644
--- a/test/functional/legacy/033_lisp_indent_spec.lua
+++ b/test/functional/legacy/033_lisp_indent_spec.lua
@@ -1,10 +1,10 @@
--- vim: set foldmethod=marker foldmarker=[[,]] :
-- Test for 'lisp'
-- If the lisp feature is not enabled, this will fail!
local helpers = require('test.functional.helpers')(after_each)
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
-local execute, expect = helpers.execute, helpers.expect
+local command, expect = helpers.command, helpers.expect
+local wait = helpers.wait
describe('lisp indent', function()
setup(clear)
@@ -13,7 +13,7 @@ describe('lisp indent', function()
insert([[
(defun html-file (base)
(format nil "~(~A~).html" base))
-
+
(defmacro page (name title &rest body)
(let ((ti (gensym)))
`(with-open-file (*standard-output*
@@ -26,29 +26,30 @@ describe('lisp indent', function()
(as h2 (string-upcase ,ti)))
(brs 3)
,@body))))
-
+
;;; Utilities for generating links
-
+
(defmacro with-link (dest &rest body)
`(progn
(format t "<a href=\"~A\">" (html-file ,dest))
,@body
(princ "</a>")))]])
- execute('set lisp')
- execute('/^(defun')
+ command('set lisp')
+ command('/^(defun')
feed('=G:/^(defun/,$yank A<cr>')
+ wait()
-- Put @a and clean empty line
- execute('%d')
- execute('0put a')
- execute('$d')
+ command('%d')
+ command('0put a')
+ command('$d')
-- Assert buffer contents.
expect([[
(defun html-file (base)
(format nil "~(~A~).html" base))
-
+
(defmacro page (name title &rest body)
(let ((ti (gensym)))
`(with-open-file (*standard-output*
@@ -61,9 +62,9 @@ describe('lisp indent', function()
(as h2 (string-upcase ,ti)))
(brs 3)
,@body))))
-
+
;;; Utilities for generating links
-
+
(defmacro with-link (dest &rest body)
`(progn
(format t "<a href=\"~A\">" (html-file ,dest))