src/tests.libraries.ss
This commit is contained in:
Abdulaziz Ghuloum 2007-05-07 22:30:27 -04:00
parent 0bb5276177
commit 887552b49f
1 changed files with 46 additions and 0 deletions

46
src/tests.libraries.ss Normal file
View File

@ -0,0 +1,46 @@
(library (F)
(export f)
(import (ikarus))
(define f
(lambda (x) 12))
(printf "F invoked\n"))
(library (G)
(export)
(import (ikarus) (F))
(define-syntax t f)
(printf "G invoked: f=~s\n" t))
(library (Q)
(export foo)
(import (ikarus))
(define-record foo (bar baz)))
(library (R)
(export)
(import (ikarus) (Q))
(printf "RTD=~s\n" (type-descriptor foo)))
(invoke (R))
(library (F0)
(export f)
(import (ikarus))
(define g 17)
(define-syntax f
(lambda (x) #'h))
(define-syntax h
(lambda (x) #'g)))
(library (F0 client)
(export)
(import (ikarus) (F0))
(unless (= (f) 17)
(error #f "F0 client"))
(printf "F0 client ok\n"))
(invoke (F0 client))