Changeset 15370
- Timestamp:
- 08/30/20 05:10:54 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/test/lisp/abcl/jar-pathname.lisp
r15190 r15370 42 42 (print form s))))) 43 43 44 (defun jar-file-init () 45 "Create the jar archives used for testing. 46 Returns the two values of the pathnames of the created archives." 44 (defun create-jar () 47 45 (let* ((temp-file (java:jcall "getAbsolutePath" 48 (java:jstatic "createTempFile" "java.io.File" "jar" "tmp")))46 (java:jstatic "createTempFile" "java.io.File" "jar" "tmp"))) 49 47 (temp-dir (make-pathname :directory (append 50 48 (pathname-directory (pathname temp-file)) 51 49 '("jar-pathname-tests"))))) 52 (ensure-directories-exist temp-dir) 53 (setf *tmp-directory* 54 (truename temp-dir) 55 *tmp-directory-whitespace* 56 (merge-pathnames "a/directory with/s p a/" *tmp-directory*))) 50 (jar-file-init temp-file temp-dir))) 51 52 (defun jar-file-init (temp-file temp-dir) 53 "Create the jar archives used for testing. 54 Returns the two values of the pathnames of the created archives." 55 (ensure-directories-exist temp-dir) 56 (setf *tmp-directory* 57 (truename temp-dir) 58 *tmp-directory-whitespace* 59 (merge-pathnames "a/directory with/s p a/" *tmp-directory*)) 57 60 (format t "~&Using ~A to create files for testing jar-pathnames.~%" *tmp-directory*) 58 61 (ensure-directories-exist *tmp-directory*) … … 69 72 (let* ((tmpdir (merge-pathnames "tmp/" *tmp-directory*)) 70 73 (subdirs 71 (mapcar (lambda (p) (merge-pathnames p tmpdir))72 '("a/b/" "d/e+f/" "path/with a couple/spaces/in it/")))74 (mapcar (lambda (p) (merge-pathnames p tmpdir)) 75 '("a/b/" "d/e+f/" "path/with a couple/spaces/in it/"))) 73 76 (sub1 (first subdirs)) 74 77 (sub2 (second subdirs)) … … 115 118 `(progn 116 119 (unless (and *tmp-jar-path* (probe-file *tmp-jar-path*)) 117 ( jar-file-init))120 (create-jar)) 118 121 (let ((*default-pathname-defaults* *tmp-directory*)) 119 122 ,@body))) … … 128 131 129 132 ;;; XXX Figure out correct use of macros so this isn't necessary 133 #| 130 134 (push 'jar-pathname.load.init *expected-failures*) 131 135 (deftest jar-pathname.load.init … … 133 137 nil) 134 138 t) 139 |# 135 140 136 141 (deftest jar-pathname.load.1 137 (load-from-jar *tmp-jar-path* " foo")142 (load-from-jar *tmp-jar-path* "__loader__._") 138 143 t) 139 144 … … 154 159 t) 155 160 161 #+(or) 156 162 (deftest jar-pathname.load.6 157 163 (load-from-jar *tmp-jar-path* "foo") … … 462 468 ;;; We allow jar-pathname to be contructed without a device to allow 463 469 ;;; MERGE-PATHNAMES to work, even though #p"file:" is illegal. 470 #+(or) 464 471 (deftest jar-pathname.12 465 472 (string= (namestring (first (pathname-device #p"jar:file:!/foo.bar")))
Note: See TracChangeset
for help on using the changeset viewer.