Closure is not a pair.
[mes.git] / tests / closure.test
index 59baf5ff2dca3b234cbe987abeecd3e564c3e7f4..809871920b68d9a9412d4ef981d7576a7fb66f73 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # -*-scheme-*-
-echo ' ()' | cat $($(dirname $0)/../scripts/include.mes $0) $0 /dev/stdin | $(dirname $0)/../scripts/mes "$@"
+echo ' ()' | cat $(dirname $0)/../module/mes/base-0.mes $0 /dev/stdin | $(dirname $0)/../scripts/mes $MES_FLAGS "$@"
 #paredit:||
 exit $?
 !#
@@ -10,7 +10,7 @@ exit $?
 ;;; Mes --- Maxwell Equations of Software
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
-;;; closure.test: This file is part of Mes.
+;;; This file is part of Mes.
 ;;;
 ;;; Mes is free software; you can redistribute it and/or modify it
 ;;; under the terms of the GNU General Public License as published by
@@ -25,8 +25,6 @@ exit $?
 ;;; You should have received a copy of the GNU General Public License
 ;;; along with Mes.  If not, see <http://www.gnu.org/licenses/>.
 
-(mes-use-module (mes base-0))
-(mes-use-module (mes base))
 (mes-use-module (mes test))
 
 (pass-if "first dummy" #t)
@@ -97,4 +95,10 @@ exit $?
     "noexpand")
    (pass-if "closure 9" (sc-expand))))
 
+(pass-if "closure is procedure"
+             (procedure? (lambda () #t)))
+
+(pass-if-not "closure is not a pair"
+             (pair? (lambda () #t)))
+
 (result 'report)