Changeset 13024
- Timestamp:
- 11/15/10 15:05:39 (13 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r13017 r13024 200 200 try { 201 201 s = URLDecoder.decode(url.getPath(), "UTF-8"); 202 // But rencode \SPACE as '+' 203 s = s.replace(' ', '+'); 202 204 } catch (java.io.UnsupportedEncodingException uee) { 203 205 // Can't happen: every Java is supposed to support -
trunk/abcl/test/lisp/abcl/jar-pathname.lisp
r12949 r13024 40 40 (compile-file "bar.lisp") 41 41 (compile-file "eek.lisp") 42 (let* ((dir (merge-pathnames "tmp/" *abcl-test-directory*)) 43 (sub (merge-pathnames "a/b/" dir))) 44 (when (probe-directory dir) 45 (delete-directory-and-files dir)) 46 (ensure-directories-exist sub) 47 (sys:unzip (merge-pathnames "foo.abcl") 48 dir) 49 (sys:unzip (merge-pathnames "foo.abcl") 50 sub) 42 (let* ((tmpdir (merge-pathnames "tmp/" *abcl-test-directory*)) 43 (subdirs 44 (mapcar (lambda (p) (merge-pathnames p tmpdir)) 45 '("a/b/" "d/e+f/"))) 46 (sub1 (first subdirs)) 47 (sub2 (second subdirs))) 48 (when (probe-directory tmpdir) 49 (delete-directory-and-files tmpdir)) 50 (mapcar (lambda (p) (ensure-directories-exist p)) subdirs) 51 (sys:unzip (merge-pathnames "foo.abcl") tmpdir) 52 (sys:unzip (merge-pathnames "foo.abcl") sub1) 51 53 (cl-fad-copy-file (merge-pathnames "bar.abcl") 52 (merge-pathnames "bar.abcl"dir))54 (merge-pathnames "bar.abcl" tmpdir)) 53 55 (cl-fad-copy-file (merge-pathnames "bar.abcl") 54 (merge-pathnames "bar.abcl" sub)) 56 (merge-pathnames "bar.abcl" sub1)) 57 (cl-fad-copy-file (merge-pathnames "bar.abcl") 58 (merge-pathnames "bar.abcl" sub2)) 55 59 (cl-fad-copy-file (merge-pathnames "eek.lisp") 56 (merge-pathnames "eek.lisp"dir))60 (merge-pathnames "eek.lisp" tmpdir)) 57 61 (cl-fad-copy-file (merge-pathnames "eek.lisp") 58 (merge-pathnames "eek.lisp" sub))62 (merge-pathnames "eek.lisp" sub1)) 59 63 (sys:zip (merge-pathnames "baz.jar") 60 (append 61 (directory (merge-pathnames "*" dir)) 62 (directory (merge-pathnames "*" sub))) 63 dir) 64 (delete-directory-and-files dir))) 64 (loop :for p :in (list tmpdir sub1 sub2) 65 :appending (directory (merge-pathnames "*" p))) 66 tmpdir) 67 #+nil (delete-directory-and-files dir))) 65 68 (setf *jar-file-init* t)) 66 69 … … 122 125 t) 123 126 127 (deftest jar-pathname.load.11 128 (with-jar-file-init 129 (load "jar:file:baz.jar!/d/e+f/bar.abcl")) 130 t) 131 124 132 ;;; wrapped in PROGN for easy disabling without a network connection 125 133 ;;; XXX come up with a better abstraction … … 132 140 133 141 (progn 134 (deftest jar-pathname.load. 11142 (deftest jar-pathname.load.http.1 135 143 (load-url-relative "foo") 136 144 t) 137 145 138 (deftest jar-pathname.load. 12146 (deftest jar-pathname.load.http.2 139 147 (load-url-relative "bar") 140 148 t) 141 149 142 (deftest jar-pathname.load. 13150 (deftest jar-pathname.load.http.3 143 151 (load-url-relative "bar.abcl") 144 152 t) 145 153 146 (deftest jar-pathname.load. 14154 (deftest jar-pathname.load.http.4 147 155 (load-url-relative "eek") 148 156 t) 149 157 150 (deftest jar-pathname.load. 15158 (deftest jar-pathname.load.http.5 151 159 (load-url-relative "eek.lisp") 152 160 t) 153 161 154 (deftest jar-pathname.load. 16162 (deftest jar-pathname.load.http.6 155 163 (load-url-relative "a/b/foo") 156 164 t) 157 165 158 (deftest jar-pathname.load. 17166 (deftest jar-pathname.load.http.7 159 167 (load-url-relative "a/b/bar") 160 168 t) 161 169 162 (deftest jar-pathname.load. 18170 (deftest jar-pathname.load.http.8 163 171 (load-url-relative "a/b/bar.abcl") 164 172 t) 165 173 166 (deftest jar-pathname.load. 19174 (deftest jar-pathname.load.http.9 167 175 (load-url-relative "a/b/eek") 168 176 t) 169 177 170 (deftest jar-pathname.load. 20178 (deftest jar-pathname.load.http.10 171 179 (load-url-relative "a/b/eek.lisp") 172 180 t)) … … 193 201 (with-jar-file-init 194 202 (probe-file "jar:file:baz.jar!/a/b")) 195 nil) 203 #p#.(format nil "jar:file:~Abaz.jar!/a/b/" 204 (namestring *abcl-test-directory*))) 196 205 197 206 (deftest jar-pathname.probe-file.5 … … 199 208 (probe-file "jar:file:baz.jar!/a/b/")) 200 209 #p#.(format nil "jar:file:~Abaz.jar!/a/b/" 210 (namestring *abcl-test-directory*))) 211 212 (deftest jar-pathname.probe-file.6 213 (with-jar-file-init 214 (probe-file "jar:file:baz.jar!/d/e+f/bar.abcl")) 215 #p#.(format nil "jar:file:~Abaz.jar!/d/e+f/bar.abcl" 201 216 (namestring *abcl-test-directory*))) 202 217
Note: See TracChangeset
for help on using the changeset viewer.