2016-12-07 19:26:41 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# -*-scheme-*-
|
test: Resurrect tests with module support.
* mes/module/mes/misc.mes: Remove.
* mes/module/srfi/srfi-26.mes: Remove.
* module/mes/misc.scm (logf, stderr, pk, pke): Remove.
(mes?, guile?, guile-1.8?, guile-2?): Move to...
* module/mes/mes-0.mes: ...new file.
* module/mes/mes-0.scm (%program, pmatch-car, pmatch-cdr): New
variables.
* tests/guile.test: Remove (mes misc) use.
* tests/pmatch.test: Use (mes guile).
* tests/data/bar.scm,
tests/data/foo.scm,: New files.
* tests/module.test: Use them to test basic Guile module support.
* build-aux/check-mes.sh (TESTS): Move it up, also fluids.test,
guile.test.
* mes/module/srfi/srfi-26.mes: Remove.
* mes/module/ice-9/rdelim.mes: New file.
* tests/scm.test ("builtin? car", "builtin? car", "builtin? cdr",
"builtin? cons", "builtin? cdr", "builtin? eq?", "builtin? eval"):
Remove.
2019-11-17 14:07:56 +00:00
|
|
|
srcdir=${srcdir-.}
|
|
|
|
GUILE_LOAD_PATH=$srcdir/tests
|
|
|
|
export GUILE_LOAD_PATH
|
|
|
|
MES_BOOT=boot-5.mes
|
|
|
|
export MES_BOOT
|
2019-11-03 21:15:11 +00:00
|
|
|
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests module)' -s "$0" "$@"
|
2016-12-07 19:26:41 +00:00
|
|
|
!#
|
|
|
|
|
2016-07-25 13:39:56 +01:00
|
|
|
;;; -*-scheme-*-
|
|
|
|
|
2018-07-22 13:24:36 +01:00
|
|
|
;;; GNU Mes --- Maxwell Equations of Software
|
test: Resurrect tests with module support.
* mes/module/mes/misc.mes: Remove.
* mes/module/srfi/srfi-26.mes: Remove.
* module/mes/misc.scm (logf, stderr, pk, pke): Remove.
(mes?, guile?, guile-1.8?, guile-2?): Move to...
* module/mes/mes-0.mes: ...new file.
* module/mes/mes-0.scm (%program, pmatch-car, pmatch-cdr): New
variables.
* tests/guile.test: Remove (mes misc) use.
* tests/pmatch.test: Use (mes guile).
* tests/data/bar.scm,
tests/data/foo.scm,: New files.
* tests/module.test: Use them to test basic Guile module support.
* build-aux/check-mes.sh (TESTS): Move it up, also fluids.test,
guile.test.
* mes/module/srfi/srfi-26.mes: Remove.
* mes/module/ice-9/rdelim.mes: New file.
* tests/scm.test ("builtin? car", "builtin? car", "builtin? cdr",
"builtin? cons", "builtin? cdr", "builtin? eq?", "builtin? eval"):
Remove.
2019-11-17 14:07:56 +00:00
|
|
|
;;; Copyright © 2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2016-07-25 13:39:56 +01:00
|
|
|
;;;
|
2018-07-22 13:24:36 +01:00
|
|
|
;;; This file is part of GNU Mes.
|
2016-07-25 13:39:56 +01:00
|
|
|
;;;
|
2018-07-22 13:24:36 +01:00
|
|
|
;;; GNU Mes is free software; you can redistribute it and/or modify it
|
2016-07-25 13:39:56 +01:00
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
2018-07-22 13:24:36 +01:00
|
|
|
;;; GNU Mes is distributed in the hope that it will be useful, but
|
2016-07-25 13:39:56 +01:00
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
2018-07-22 13:24:36 +01:00
|
|
|
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
2016-07-25 13:39:56 +01:00
|
|
|
|
2018-07-21 12:48:50 +01:00
|
|
|
(define-module (tests module)
|
test: Resurrect tests with module support.
* mes/module/mes/misc.mes: Remove.
* mes/module/srfi/srfi-26.mes: Remove.
* module/mes/misc.scm (logf, stderr, pk, pke): Remove.
(mes?, guile?, guile-1.8?, guile-2?): Move to...
* module/mes/mes-0.mes: ...new file.
* module/mes/mes-0.scm (%program, pmatch-car, pmatch-cdr): New
variables.
* tests/guile.test: Remove (mes misc) use.
* tests/pmatch.test: Use (mes guile).
* tests/data/bar.scm,
tests/data/foo.scm,: New files.
* tests/module.test: Use them to test basic Guile module support.
* build-aux/check-mes.sh (TESTS): Move it up, also fluids.test,
guile.test.
* mes/module/srfi/srfi-26.mes: Remove.
* mes/module/ice-9/rdelim.mes: New file.
* tests/scm.test ("builtin? car", "builtin? car", "builtin? cdr",
"builtin? cons", "builtin? cdr", "builtin? eq?", "builtin? eval"):
Remove.
2019-11-17 14:07:56 +00:00
|
|
|
#:use-module (data foo)
|
|
|
|
#:use-module (data bar)
|
2018-07-21 12:48:50 +01:00
|
|
|
#:use-module (mes test))
|
|
|
|
|
2016-12-07 19:26:41 +00:00
|
|
|
(pass-if "first dummy" #t)
|
|
|
|
(pass-if-not "second dummy" #f)
|
2016-10-12 22:40:11 +01:00
|
|
|
|
test: Resurrect tests with module support.
* mes/module/mes/misc.mes: Remove.
* mes/module/srfi/srfi-26.mes: Remove.
* module/mes/misc.scm (logf, stderr, pk, pke): Remove.
(mes?, guile?, guile-1.8?, guile-2?): Move to...
* module/mes/mes-0.mes: ...new file.
* module/mes/mes-0.scm (%program, pmatch-car, pmatch-cdr): New
variables.
* tests/guile.test: Remove (mes misc) use.
* tests/pmatch.test: Use (mes guile).
* tests/data/bar.scm,
tests/data/foo.scm,: New files.
* tests/module.test: Use them to test basic Guile module support.
* build-aux/check-mes.sh (TESTS): Move it up, also fluids.test,
guile.test.
* mes/module/srfi/srfi-26.mes: Remove.
* mes/module/ice-9/rdelim.mes: New file.
* tests/scm.test ("builtin? car", "builtin? car", "builtin? cdr",
"builtin? cons", "builtin? cdr", "builtin? eq?", "builtin? eval"):
Remove.
2019-11-17 14:07:56 +00:00
|
|
|
(pass-if "defined foo"
|
|
|
|
(defined? 'foo))
|
|
|
|
|
|
|
|
(pass-if-equal "foo"
|
|
|
|
"foo"
|
|
|
|
(and (defined? 'foo) foo))
|
|
|
|
|
|
|
|
(pass-if "defined bar"
|
|
|
|
(defined? 'bar))
|
|
|
|
|
|
|
|
(pass-if-equal "bar"
|
|
|
|
"bar"
|
|
|
|
(and (defined? 'bar) bar))
|
|
|
|
|
2016-12-07 19:26:41 +00:00
|
|
|
(result 'report)
|