~ chicken-core (master) /tests/executable-tests.scm
Trap1;;; Compiled executable tests23(include "test.scm")45(import (chicken file)6 (chicken file posix)7 (chicken pathname)8 (chicken process-context)9 (chicken string))1011(define program-path12 (car (command-line-arguments)))1314(define (read-symbolic-link* p)15 (cond-expand16 ((and windows (not cygwin)) p)17 (else (read-symbolic-link p #t))))1819(test-begin "executable tests")2021(let ((p (program-name)))22 (test-equal "program-name"23 (pathname-strip-directory p)24 (pathname-strip-directory program-path)))2526(and-let* ((p (executable-pathname)))27 (test-equal "executable-pathname"28 (read-symbolic-link* p)29 (read-symbolic-link* program-path)))3031(test-end)3233(test-exit)