view src/testdir/test33.in @ 11079:50459aeb4773 v8.0.0428

patch 8.0.0428: git and hg see new files after running tests commit https://github.com/vim/vim/commit/65408f7dfbd4bb50d740a8b8f2171080571223f2 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 7 21:31:27 2017 +0100 patch 8.0.0428: git and hg see new files after running tests Problem: Git and hg see new files after running tests. (Manuel Ortega) Solution: Add the generated file to .hgignore (or .gitignore). Delete the resulting verbose file. (Christian Brabandt) Improve dependency on opt_test.vim. Reset the 'more' option.
author Christian Brabandt <cb@256bit.org>
date Tue, 07 Mar 2017 21:45:04 +0100
parents 3fc0f57ecb91
children
line wrap: on
line source

Test for 'lisp'
If the lisp feature is not enabled, this will fail!

STARTTEST
:so small.vim
:set lisp
/^(defun
=G:/^(defun/,$w! test.out
:q!
ENDTEST

(defun html-file (base)
(format nil "~(~A~).html" base))

(defmacro page (name title &rest body)
(let ((ti (gensym)))
`(with-open-file (*standard-output*
(html-file ,name)
:direction :output
:if-exists :supersede)
(let ((,ti ,title))
(as title ,ti)
(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>")))