tests/module.mes: first pass!
* tests/data/foo.scm, tests/data/bar.scm: New files. * tests/module.test (tests): Use them to test Guile module-lookup.
This commit is contained in:
parent
4dcff51a38
commit
d7b6f777dd
|
@ -0,0 +1,29 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
;;; GNU Mes is free software; you can redistribute it and/or modify it
|
||||
;;; 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.
|
||||
;;;
|
||||
;;; GNU Mes is distributed in the hope that it will be useful, but
|
||||
;;; 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
|
||||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; bar.scm is used by tests/module.test
|
||||
|
||||
;;; Code:
|
||||
|
||||
(pke "hello bar!!!")
|
||||
(define-module (tests data bar)
|
||||
#:export (bar))
|
||||
|
||||
(define bar "bar")
|
|
@ -0,0 +1,30 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
;;; GNU Mes is free software; you can redistribute it and/or modify it
|
||||
;;; 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.
|
||||
;;;
|
||||
;;; GNU Mes is distributed in the hope that it will be useful, but
|
||||
;;; 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
|
||||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; foo.scm is used by tests/module.test
|
||||
|
||||
;;; Code:
|
||||
|
||||
(pke "hello foo!!!")
|
||||
|
||||
(define-module (tests data foo)
|
||||
#:export (foo))
|
||||
|
||||
(define foo "foo")
|
|
@ -1,6 +1,7 @@
|
|||
#! /bin/sh
|
||||
# -*-scheme-*-
|
||||
GUILE_LOAD_PATH=mes/module:module
|
||||
srcdir=${srcdir-.}
|
||||
GUILE_LOAD_PATH=mes/module:module:$srcdir
|
||||
export GUILE_LOAD_PATH
|
||||
MES_BOOT=boot-5.mes
|
||||
export MES_BOOT
|
||||
|
@ -29,10 +30,19 @@ exec ${MES-bin/mes} --no-auto-compile -L ${0%/*} -L module -C module -e '(tests
|
|||
|
||||
(define-module (tests module)
|
||||
;; #:use-module (mes mes-0)
|
||||
;; #:use-module (mes misc)
|
||||
#:use-module (mes test))
|
||||
#:use-module (tests data foo)
|
||||
#:use-module (tests data bar)
|
||||
;;#:use-module (mes test)
|
||||
)
|
||||
|
||||
(pass-if "first dummy" #t)
|
||||
(pass-if-not "second dummy" #f)
|
||||
(define (tests . rest) (format (current-error-port) "zis is tests: rest=~s\n" rest))
|
||||
(define (module) "zis is module")
|
||||
(pke "hiero")
|
||||
(format (current-error-port) "foo=~s\n" foo)
|
||||
(format (current-error-port) "bar=~s\n" bar)
|
||||
|
||||
(result 'report)
|
||||
|
||||
;; (pass-if "first dummy" #t)
|
||||
;; (pass-if-not "second dummy" #f)
|
||||
|
||||
;;(result 'report)
|
||||
|
|
Loading…
Reference in New Issue