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