check: resurrect guile-check.

This commit is contained in:
Jan Nieuwenhuizen 2016-07-23 15:17:03 +02:00
parent ab381c841a
commit 262c507303
2 changed files with 8 additions and 6 deletions

View file

@ -30,11 +30,14 @@ mes.h: mes.c GNUmakefile
echo "a = add_environment (a, \"$$scm_name\", &scm_$$name);" 1>&2;\
done; echo '#endif'; echo '#endif' 1>&2) > $@ 2>environment.i
check: all
check: all guile-check
./mes.test
./mes.test ./mes
cat scm.mes lib/srfi/srfi-0.scm test.mes | ./mes
guile-check:
guile -s test.mes
run: all
cat scm.mes test.mes | ./mes

View file

@ -32,9 +32,8 @@
((car t) (display ": pass") (newline) (set! pass (+ pass 1)))
(#t (display ": fail") (newline) (set! fail (+ fail 1)))))))
;;(define (guile?) (defined? 'gc))
(define (guile?) #f)
(when (guile?)
(define guile? (defined? 'gc))
(when guile?
(module-define! (current-module) 'builtin? (lambda (. x) #t))
(use-modules (srfi srfi-1)))
@ -167,7 +166,7 @@
;;(pass-if "builtin?" (builtin? cond))
(pass-if "procedure?" (procedure? builtin?))
(pass-if "procedure?" (procedure? procedure?))
(when (not (guile?))
(when (not guile?)
(pass-if "gensym" (seq? (gensym) 'g0))
(pass-if "gensym" (seq? (gensym) 'g1))
(pass-if "gensym" (seq? (gensym) 'g2)))
@ -235,7 +234,7 @@
;; (circular-list? x))
;; #t))
(pass-if "cond-expand" (sequal? (cond-expand (foobar #f) (mes (display ": pass: *YAY*") 'mes)) 'mes))
(pass-if "cond-expand" (sequal? (cond-expand (foobar #f) (mes (display ": pass: *YAY*") 'mes) (guile (display ": pass: *GUILE*") 'mes)) 'mes))
(newline)
(display "passed: ") (display (car (result))) (newline)