~ chicken-core (chicken-5) /tests/csc-tests.scm
Trap1;;; csc interface tests23(import (chicken file)4 (chicken pathname)5 (chicken platform)6 (chicken process)7 (chicken process-context)8 (chicken string))910(include "programs-path.scm")1112(define (realpath x)13 (normalize-pathname (make-pathname (current-directory) x)))1415(define (run x . args)16 (system* (string-intersperse (cons (realpath x) args))))1718(define (csc . args)19 (apply run csc-path "-v" "-I.." "-compiler" (realpath chicken-path) "-libdir" ".." args))2021(csc "null.scm" "-t")22(assert (file-exists? "null.c"))2324(define obj-file (if (eq? (software-version) 'mingw32) "null.obj" "null.o"))2526(csc "null.c" "-c")27(assert (file-exists? obj-file))2829(csc obj-file)30(run "null")