Chicken fixes
This commit is contained in:
parent
71ed0ef352
commit
194c4c62bc
2
Makefile
2
Makefile
|
|
@ -43,7 +43,7 @@ test: tmp/test/libtest.o tmp/test/libtest.so tmp/test/libtest.a
|
||||||
COMPILE_R7RS_KAWA="-J--add-exports=java.base/jdk.internal.foreign.abi=ALL-UNNAMED -J--add-exports=java.base/jdk.internal.foreign.layout=ALL-UNNAMED -J--add-exports=java.base/jdk.internal.foreign=ALL-UNNAMED -J--enable-native-access=ALL-UNNAMED -J--enable-preview" \
|
COMPILE_R7RS_KAWA="-J--add-exports=java.base/jdk.internal.foreign.abi=ALL-UNNAMED -J--add-exports=java.base/jdk.internal.foreign.layout=ALL-UNNAMED -J--add-exports=java.base/jdk.internal.foreign=ALL-UNNAMED -J--enable-native-access=ALL-UNNAMED -J--enable-preview" \
|
||||||
COMPILE_R7RS=${SCHEME} \
|
COMPILE_R7RS=${SCHEME} \
|
||||||
compile-r7rs -I . -I /usr/local/share/kawa/lib -o ${TEST} ${TEST}.scm
|
compile-r7rs -I . -I /usr/local/share/kawa/lib -o ${TEST} ${TEST}.scm
|
||||||
cd tmp/test && ./${TEST}
|
cd tmp/test && LD_LIBRARY_PATH=. ./${TEST}
|
||||||
|
|
||||||
test-compile-r7rs-snow: tmp/test/libtest.o tmp/test/libtest.so tmp/test/libtest.a
|
test-compile-r7rs-snow: tmp/test/libtest.o tmp/test/libtest.so tmp/test/libtest.a
|
||||||
cp tests/*.scm tmp/test/
|
cp tests/*.scm tmp/test/
|
||||||
|
|
|
||||||
|
|
@ -328,11 +328,11 @@
|
||||||
(define output-file (c-fopen (string->c-utf8 "testfile.test")
|
(define output-file (c-fopen (string->c-utf8 "testfile.test")
|
||||||
(string->c-utf8 "w")))
|
(string->c-utf8 "w")))
|
||||||
(debug output-file)
|
(debug output-file)
|
||||||
(define-c-procedure c-fprintf libc 'fprintf 'int '(pointer pointer))
|
(define-c-procedure c-fprintf libc 'fprintf 'int '(pointer pointer int))
|
||||||
(define characters-written
|
(define characters-written
|
||||||
(c-fprintf output-file (string->c-utf8 "Hello world")))
|
(c-fprintf output-file (string->c-utf8 "Hello world %i") 1))
|
||||||
(debug characters-written)
|
(debug characters-written)
|
||||||
(assert equal? (= characters-written 11) #t)
|
(assert equal? (= characters-written 13) #t)
|
||||||
(define-c-procedure c-fclose libc 'fclose 'int '(pointer))
|
(define-c-procedure c-fclose libc 'fclose 'int '(pointer))
|
||||||
(define closed-status (c-fclose output-file))
|
(define closed-status (c-fclose output-file))
|
||||||
(debug closed-status)
|
(debug closed-status)
|
||||||
|
|
@ -340,6 +340,6 @@
|
||||||
(assert equal? (file-exists? "testfile.test") #t)
|
(assert equal? (file-exists? "testfile.test") #t)
|
||||||
(assert equal? (string=? (with-input-from-file "testfile.test"
|
(assert equal? (string=? (with-input-from-file "testfile.test"
|
||||||
(lambda () (read-line)))
|
(lambda () (read-line)))
|
||||||
"Hello world") #t)
|
"Hello world 1") #t)
|
||||||
|
|
||||||
(exit 0)
|
(exit 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue