0.6.9.8:
[sbcl.git] / tests / side-effectful-pathnames.test.sh
1 #!/bin/sh
2
3 # FIXME: MNA wrote the tests below to work with the new
4 # lp-test-file.lisp file in place. It'd be good to replace them either
5 # with code which uses an existing distribution file instead, or with
6 # code which creates a new file in $TMPDIR and uses that. Meanwhile,
7 # we just return success immediately instead of doing anything.
8 exit 104
9
10 ;;; loading files w/ logical pathnames
11 (setf (logical-pathname-translations "TEST")
12         '(("**;*.*.*"
13            #.(concatenate 'string
14               (namestring (sb-int:default-directory))
15               "**/*.*"))
16           ("**;*.*.*"
17            #.(concatenate 'string
18               (namestring (sb-int:default-directory))
19               "**/*.*.*"))))
20 (assert (equal (namestring (translate-logical-pathname
21                             "test:lp-test-file.lisp"))
22                #.(concatenate 'string
23                               (namestring (sb-int:default-directory))
24                               "lp-test-file.lisp")))
25 (load "TEST:LP-TEST-FILE")
26 (let ((compiled-file-name (namestring (compile-file "TEST:LP-TEST-FILE")))
27       (should-be-file-name
28         #.(concatenate 'string
29                        (namestring (sb-int:default-directory))
30                        "lp-test-file.x86f")))
31   (assert (equal compiled-file-name should-be-file-name)))