Bring things to new compile-r7rs

This commit is contained in:
retropikzel 2025-07-19 19:41:40 +03:00
parent 817a6e2933
commit 254cb2a318
2 changed files with 9 additions and 4 deletions

View File

@ -6,11 +6,16 @@ VERSION=$(shell awk '/version:/{ print $$2 }' README.md )
TEST=primitives
SCHEME=chibi
TMPDIR=tmp/${SCHEME}
DOCKERIMG=${SCHEME}:head
DOCKERIMG=${SCHEME}
ifeq "${SCHEME}" "chicken"
DOCKERIMG="chicken:5"
endif
INCDIRS=-I . -I /usr/local/share/kawa/lib
ifeq "${SCHEME}" "ypsilon"
INCDIRS=-I .
endif
all: build ${TMPDIR}
build:
@ -58,7 +63,7 @@ test: ${TMPDIR}/test/libtest.o ${TMPDIR}/test/libtest.so ${TMPDIR}/test/libtest.
COMPILE_R7RS_CHICKEN="-L -ltest -I. -L." \
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 -I . -I /usr/local/share/kawa/lib -o ${TEST} ${TEST}.scm
compile-r7rs ${INCDIRS} -o ${TEST} ${TEST}.scm
cd ${TMPDIR}/test && \
LD_LIBRARY_PATH=. \
GUILE_AUTO_COMPILE=0 \

View File

@ -1,6 +1,6 @@
(import (scheme base)
(scheme write)
(scheme read)
(scheme read)
(scheme char)
(scheme file)
(scheme process-context)
@ -342,7 +342,7 @@
(assert equal? (= closed-status 0) #t)
(assert equal? (file-exists? "testfile.test") #t)
(define file-content (with-input-from-file "testfile.test"
(lambda () (read-line))))
(lambda () (read-line))))
(assert equal? (string=? file-content "Hello world 1") #t)
(exit)