1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-10 11:20:28 +02:00
guile/test-suite/standalone/test-asmobs
Neil Jerram f41529c37b Make test scripts check GUILE environment variable
So that they use the guile (or guile.exe, in the MinGW case) that was
just built, and not just any guile that can be found in the PATH.

* test-suite/standalone/test-asmobs: Use ${GUILE:-guile} instead of
  guile.

* test-suite/standalone/test-bad-identifiers: Ditto.

* test-suite/standalone/test-fast-slot-ref.in: Ditto.

* test-suite/standalone/test-require-extension: Ditto.

* test-suite/standalone/test-system-cmds: Ditto.

* test-suite/standalone/test-use-srfi.in: Ditto.
2010-03-05 23:31:06 +00:00

118 lines
No EOL
2.9 KiB
Bash
Executable file

#!/bin/sh
exec ${GUILE:-guile} -q -s "$0" "$@"
!#
(load-extension (string-append (getenv "builddir") "/libtest-asmobs")
"libtest_asmobs_init")
(define (test x v)
(if v
(if (not (equal? (eval x (current-module)) v))
(error "Wrong return value" x))
(catch #t
(lambda ()
(begin (eval x (current-module))
(throw 'should-be-error)))
(lambda (key . args)
(if (eq? key 'should-be-error)
(error "Should be error" x))))))
(define asmob000 (make-asmob000))
(test '(asmob000) '())
(test '(asmob000 1) #f)
(test '(asmob000 1 2) #f)
(test '(asmob000 1 2 3) #f)
(define asmob100 (make-asmob100))
(test '(asmob100) #f)
(test '(asmob100 1) '(1))
(test '(asmob100 1 2) #f)
(test '(asmob100 1 2 3) #f)
(define asmob010 (make-asmob010))
(test '(asmob010) '(#f))
(test '(asmob010 1) '(1))
(test '(asmob010 1 2) #f)
(test '(asmob010 1 2 3) #f)
(define asmob001 (make-asmob001))
(test '(asmob001) '(()))
(test '(asmob001 1) '((1)))
(test '(asmob001 1 2) '((1 2)))
(test '(asmob001 1 2 3) '((1 2 3)))
(define asmob200 (make-asmob200))
(test '(asmob200) #f)
(test '(asmob200 1) #f)
(test '(asmob200 1 2) '(1 2))
(test '(asmob200 1 2 3) #f)
(define asmob110 (make-asmob110))
(test '(asmob110) #f)
(test '(asmob110 1) '(1 #f))
(test '(asmob110 1 2) '(1 2))
(test '(asmob110 1 2 3) #f)
(define asmob020 (make-asmob020))
(test '(asmob020) '(#f #f))
(test '(asmob020 1) '(1 #f))
(test '(asmob020 1 2) '(1 2))
(test '(asmob020 1 2 3) #f)
(define asmob101 (make-asmob101))
(test '(asmob101) #f)
(test '(asmob101 1) '(1 ()))
(test '(asmob101 1 2) '(1 (2)))
(test '(asmob101 1 2 3) '(1 (2 3)))
(define asmob011 (make-asmob011))
(test '(asmob011) '(#f ()))
(test '(asmob011 1) '(1 ()))
(test '(asmob011 1 2) '(1 (2)))
(test '(asmob011 1 2 3) '(1 (2 3)))
(define asmob300 (make-asmob300))
(test '(asmob300) #f)
(test '(asmob300 1) #f)
(test '(asmob300 1 2) #f)
(test '(asmob300 1 2 3) '(1 2 3))
(define asmob210 (make-asmob210))
(test '(asmob210) #f)
(test '(asmob210 1) #f)
(test '(asmob210 1 2) '(1 2 #f))
(test '(asmob210 1 2 3) '(1 2 3))
(define asmob120 (make-asmob120))
(test '(asmob120) #f)
(test '(asmob120 1) '(1 #f #f))
(test '(asmob120 1 2) '(1 2 #f))
(test '(asmob120 1 2 3) '(1 2 3))
(define asmob030 (make-asmob030))
(test '(asmob030) '(#f #f #f))
(test '(asmob030 1) '(1 #f #f))
(test '(asmob030 1 2) '(1 2 #f))
(test '(asmob030 1 2 3) '(1 2 3))
(define asmob201 (make-asmob201))
(test '(asmob201) #f)
(test '(asmob201 1) #f)
(test '(asmob201 1 2) '(1 2 ()))
(test '(asmob201 1 2 3) '(1 2 (3)))
(define asmob021 (make-asmob021))
(test '(asmob021) '(#f #f ()))
(test '(asmob021 1) '(1 #f ()))
(test '(asmob021 1 2) '(1 2 ()))
(test '(asmob021 1 2 3) '(1 2 (3)))
(define asmob111 (make-asmob111))
(test '(asmob111) #f)
(test '(asmob111 1) '(1 #f ()))
(test '(asmob111 1 2) '(1 2 ()))
(test '(asmob111 1 2 3) '(1 2 (3)))
;; Local Variables:
;; mode: scheme
;; End: