3 # This software is part of the SBCL system. See the README file for
6 # While most of SBCL is derived from the CMU CL system, the test
7 # files (like this one) were written from scratch after the fork
10 # This software is in the public domain and is provided with
11 # absolutely no warranty. See the COPYING and CREDITS files for
14 # LOADing and COMPILEing files with logical pathnames
15 testdir=`pwd`"/side-effectful-pathnames-test-$$"
16 testfilestem="load-test"
17 StudlyCapsStem="Load-Test"
18 testfilename="$testdir/$testfilestem.lisp"
20 cat >$testfilename <<EOF
22 (defparameter *loaded* :yes)
26 (setf (logical-pathname-translations "TEST")
27 (list (list "**;*.*.*" "$testdir/**/*.*")))
28 (format t "/translations=~S~%" (logical-pathname-translations "TEST"))
29 (let* ((untranslated "test:$StudlyCapsStem.lisp")
30 (ignore-me (format t "untranslated=~S~%" untranslated))
31 (translation (namestring (translate-logical-pathname untranslated)))
32 (expected-translation "$testdir/$testfilestem.lisp"))
33 (format t "translation=~S~%" translation)
34 (format t "expected-translation=~S~%" expected-translation)
35 (assert (string= translation expected-translation)))
36 (load "TEST:$StudlyCapsStem")
37 (assert (eq *loaded* :yes))
38 (let ((compiled-file-name (namestring (compile-file "TEST:$StudlyCapsStem")))
39 (expected-file-name "$testdir/$testfilestem.x86f"))
40 (format t "compiled-file-name=~S~%" compiled-file-name)
41 (format t "expected-file-name=~S~%" expected-file-name)
42 (assert (string= compiled-file-name expected-file-name)))
43 (sb-ext:quit :unix-status 52)