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 scm))
29 (mes-use-module (mes test))
32 (pass-if "values" (seq? (values 0 1) 0)))
34 (pass-if "values 2" (seq? ((lambda (x) x) (values 1 2 3)) 1)))
36 (pass-if "values 3" (seq? 1 ((lambda (x) x) (values 1 2 3)))))
37 (pass-if "call-with-values" (seq? (call-with-values (lambda () (values 1 2 3))
38 (lambda (a b c) (+ a b c)))
41 (pass-if-equal "lambda"
45 (lambda (one two three four five)
46 (list one two three four five))))
48 (pass-if-equal "values 5"
53 (lambda (one two three four five)
54 (list one two three four five))))
56 (pass-if-equal "values rests"
64 (pass-if-equal "values 4a 4b"
66 ((lambda (one two three four five)
72 ;;(cons 4a 4b) FIXME: non-compliancy?
76 1 2 3 (values 'four-a 'four-b) 5))