diff options
Diffstat (limited to 'test/functional/legacy/033_lisp_indent_spec.lua')
-rw-r--r-- | test/functional/legacy/033_lisp_indent_spec.lua | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/test/functional/legacy/033_lisp_indent_spec.lua b/test/functional/legacy/033_lisp_indent_spec.lua index b4abb02ac2..5132333a5c 100644 --- a/test/functional/legacy/033_lisp_indent_spec.lua +++ b/test/functional/legacy/033_lisp_indent_spec.lua @@ -1,19 +1,20 @@ --- 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) + -- luacheck: ignore 621 (Indentation) it('is working', 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* @@ -22,33 +23,34 @@ describe('lisp indent', function() :if-exists :supersede) (let ((,ti ,title)) (as title ,ti) - (with center + (with center (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* @@ -57,13 +59,13 @@ describe('lisp indent', function() :if-exists :supersede) (let ((,ti ,title)) (as title ,ti) - (with center + (with center (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)) |