3 echo ' ()' | cat $(dirname $0)/../module/mes/base-0.mes $0 /dev/stdin | $(dirname $0)/../scripts/mes $MES_FLAGS "$@"
10 ;;; Mes --- Maxwell Equations of Software
11 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
13 ;;; This file is part of Mes.
15 ;;; Mes is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; Mes is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with Mes. If not, see <http://www.gnu.org/licenses/>.
28 (mes-use-module (mes test))
30 (pass-if "first dummy" #t)
31 (pass-if-not "second dummy" #f)
34 (define x (lambda () b))
36 (pass-if "closure" (seq? (x) 0))
39 (pass-if "closure 2" (seq? (c 1) 0))
49 (pass-if "closure 3" (sequal? (x) '(0 0)))
53 (let ((count (let ((counter 0))
74 (define name? symbol?)
80 (define-macro (foo? q+q)
83 (pass-if-equal "closure 7" #f (defined? 'q+q))
86 (pass-if-equal "closure 8" #f (not (defined? 'x))))
96 (pass-if "closure 9" (sc-expand))))
98 (pass-if "closure is procedure"
99 (procedure? (lambda () #t)))
101 (pass-if-not "closure is not a pair"
102 (pair? (lambda () #t)))