build: Refactor mes tests.
[mes.git] / module / mes / mes-0.scm
1 ;;; -*-scheme-*-
2
3 ;;; Mes --- Maxwell Equations of Software
4 ;;; Copyright © 2016,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 ;;;
6 ;;; mes-0.scm: This file is part of Mes.
7 ;;;
8 ;;; Mes is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; Mes is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with Mes.  If not, see <http://www.gnu.org/licenses/>.
20
21 ;;; Commentary:
22
23 ;;; mes-0.scm is the first file being loaded into Guile.  It provides
24 ;;; non-standard definitions that Mes modules and tests depend on.
25
26 ;;; Code:
27
28 (define-module (mes mes-0)
29   #:export (
30             builtin?
31             mes-use-module
32             EOF
33             append2
34             mes?
35             guile?
36             guile-1.8?
37             guile-2?
38             ))
39
40 (define-macro (mes-use-module . rest) #t)
41 (define builtin? procedure?) ; not strictly true, but ok for tests/*.test
42 (define mes? #f)
43 (define guile? #t)
44 (define guile-1.8? (equal? (effective-version) "1.8"))
45 (define guile-2? (equal? (major-version) "2"))
46 (define EOF (if #f #f))
47 (define append2 append)