tests: Adjust to work with Guile modules.
* tests/base.test: Do not override 'MES_BOOT' if already set. [mes]: Only load "test.scm" if the module system is not booted. (lookup-toplevel): Use 'module-variable' if the module system is booted. * tests/match.test: Import '(ice-9 match)' directly. * tests/boot.test: Do not override 'MES_BOOT' if already set. * tests/guile-module.test: Likewise. * tests/macro.test: Likewise. * tests/perform.test: Likewise. * tests/quasiquote.test: Likewise. * tests/read.test: Likewise. * tests/scm.test: Likewise. * tests/srfi-0.test: Likewise. * tests/srfi-9.test: Likewise.
This commit is contained in:
parent
1d8b876565
commit
d47735122a
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES_BOOT=boot-03.scm exec ${MES-bin/mes} < $0
|
||||
fi
|
||||
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests boot)' -s "$0" "$@"
|
||||
|
@ -32,7 +32,8 @@ exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests
|
|||
|
||||
(cond-expand
|
||||
(mes
|
||||
(primitive-load "module/mes/test.scm"))
|
||||
(unless (current-module)
|
||||
(primitive-load "module/mes/test.scm")))
|
||||
(guile-2)
|
||||
(guile
|
||||
(use-modules (ice-9 syncase))))
|
||||
|
@ -95,7 +96,7 @@ exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests
|
|||
(pass-if-not "top let define " (defined? '*top-let-define-a*))
|
||||
|
||||
(define (lookup-toplevel name)
|
||||
(if guile?
|
||||
(if (or guile? (current-module))
|
||||
(module-variable (current-module) name)
|
||||
(hashq-ref (initial-module) name)))
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES_BOOT=boot-02.scm exec ${MES-bin/mes} < $0
|
||||
fi
|
||||
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests boot)' -s "$0" "$@"
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
srcdir=${srcdir-.}
|
||||
GUILE_LOAD_PATH=$srcdir/tests
|
||||
export GUILE_LOAD_PATH
|
||||
MES_BOOT=boot-5.scm
|
||||
export MES_BOOT
|
||||
if [ -z "$MES_BOOT" ]; then
|
||||
MES_BOOT=boot-5.scm
|
||||
export MES_BOOT
|
||||
fi
|
||||
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests guile-module)' -s "$0" "$@"
|
||||
!#
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
export MES_BOOT=boot-02.scm
|
||||
MES=${MES-$(dirname $0)/../bin/mes}
|
||||
$MES < $0
|
||||
|
|
|
@ -24,17 +24,13 @@ exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests
|
|||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (tests match)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (mes mes-0)
|
||||
#:use-module (mes test))
|
||||
|
||||
(mes-use-module (mes match))
|
||||
(mes-use-module (mes test))
|
||||
|
||||
(cond-expand
|
||||
(guile
|
||||
(use-modules (ice-9 match)))
|
||||
(mes))
|
||||
|
||||
(pass-if "first dummy" #t)
|
||||
(pass-if-not "second dummy" #f)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES=${MES-$(dirname $0)/../bin/mes}
|
||||
MES_BOOT=boot-02.scm exec $MES < $0
|
||||
exit $?
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES_BOOT=boot-03.scm exec ${MES-bin/mes} < $0
|
||||
fi
|
||||
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests boot)' -s "$0" "$@"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES=${MES-$(dirname $0)/../bin/mes}
|
||||
MES_BOOT=boot-02.scm exec $MES < $0
|
||||
fi
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES_BOOT=boot-03.scm exec ${MES-bin/mes} < $0
|
||||
fi
|
||||
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests boot)' -s "$0" "$@"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
export MES_BOOT=boot-02.scm
|
||||
MES=${MES-$(dirname $0)/../bin/mes}
|
||||
$MES < $0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
# bootstrap srfi-9
|
||||
if [ "$MES" != guile ]; then
|
||||
if [ "$MES" != guile -a -z "$MES_BOOT" ]; then
|
||||
MES_BOOT=boot-03.scm exec ${MES-bin/mes} < $0
|
||||
fi
|
||||
exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests srfi-9)' -s "$0" "$@"
|
||||
|
|
Loading…
Reference in New Issue