From 194c4c62bc595a6d7dbf0d64089c8beb19f6e510 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Thu, 10 Jul 2025 07:41:50 +0300 Subject: [PATCH] Chicken fixes --- Makefile | 2 +- tests/primitives.scm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b06ca23..e8c0a90 100644 --- a/Makefile +++ b/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=${SCHEME} \ 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 cp tests/*.scm tmp/test/ diff --git a/tests/primitives.scm b/tests/primitives.scm index bc56e4b..b4bc51c 100644 --- a/tests/primitives.scm +++ b/tests/primitives.scm @@ -328,11 +328,11 @@ (define output-file (c-fopen (string->c-utf8 "testfile.test") (string->c-utf8 "w"))) (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 - (c-fprintf output-file (string->c-utf8 "Hello world"))) + (c-fprintf output-file (string->c-utf8 "Hello world %i") 1)) (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 closed-status (c-fclose output-file)) (debug closed-status) @@ -340,6 +340,6 @@ (assert equal? (file-exists? "testfile.test") #t) (assert equal? (string=? (with-input-from-file "testfile.test" (lambda () (read-line))) - "Hello world") #t) + "Hello world 1") #t) (exit 0)