3 # LOADing and COMPILEing files with logical pathnames
4 testdir=`pwd`"/side-effectful-pathnames-test-$$"
5 testfilestem="load-test"
6 StudlyCapsStem="Load-Test"
7 testfilename="$testdir/$testfilestem.lisp"
9 cat >$testfilename <<EOF
11 (defparameter *loaded* :yes)
13 sbcl --noinform --noprint --sysinit /dev/null --userinit /dev/null <<EOF
15 (setf (logical-pathname-translations "TEST")
16 (list (list "**;*.*.*" "$testdir/**/*.*")))
17 (format t "/translations=~S~%" (logical-pathname-translations "TEST"))
18 (let* ((untranslated "test:$StudlyCapsStem.lisp")
19 (ignore-me (format t "untranslated=~S~%" untranslated))
20 (translation (namestring (translate-logical-pathname untranslated)))
21 (expected-translation "$testdir/$testfilestem.lisp"))
22 (format t "translation=~S~%" translation)
23 (format t "expected-translation=~S~%" expected-translation)
24 (assert (string= translation expected-translation)))
25 (load "TEST:$StudlyCapsStem")
26 (assert (eq *loaded* :yes))
27 (let ((compiled-file-name (namestring (compile-file "TEST:$StudlyCapsStem")))
28 (expected-file-name "$testdir/$testfilestem.x86f"))
29 (format t "compiled-file-name=~S~%" compiled-file-name)
30 (format t "expected-file-name=~S~%" expected-file-name)
31 (assert (string= compiled-file-name expected-file-name)))
32 (sb-ext:quit :unix-status 52)