source: trunk/abcl/test/lisp/abcl/jar-file.lisp @ 12301

Last change on this file since 12301 was 12301, checked in by Mark Evenson, 11 years ago

Loading ABCL tests improved; renamed loading jar-file tests.

ASDF loading of ABCL-TEST-LISP improved to not need :FORCE argument.

JAR-FILE tests included as part of ABCL-TEST-LISP.

File size: 1.7 KB
Line 
1(in-package #:abcl.test.lisp)
2
3#-:unix (error "Load test setup currently needs UNIX shell script support.")
4
5(defun load-init ()
6  (let* ((*default-pathname-defaults* *this-directory*)
7         (asdf::*verbose-out* *standard-output*)
8         (package-command (format nil "cd ~A; sh ~A" 
9                                  *this-directory*
10                                  (merge-pathnames "package-load.sh"))))
11    (compile-file "foo.lisp")
12    (compile-file "bar.lisp")
13    (compile-file "eek.lisp")
14    (asdf:run-shell-command package-command))
15  (setf *jar-file-init* t))
16
17(defvar *jar-file-init* nil)
18
19
20(defmacro with-jar-file-init (&rest body)
21  `(let ((*default-pathname-defaults* *this-directory*))
22     (progn
23       (unless *jar-file-init*
24         (load-init))
25       ,@body)))
26 
27
28(deftest jar-file-load.1
29    (with-jar-file-init
30        (load "foo"))
31  t)
32
33(deftest jar-file-load.2
34    (with-jar-file-init
35      (load "foo.lisp"))
36  t)
37
38(deftest jar-file-load.3
39    (with-jar-file-init
40      (load "foo.abcl"))
41  t)
42
43(deftest jar-file-load.4
44    (with-jar-file-init
45      (load "jar:file:baz.jar!/foo"))
46  t)
47
48(deftest jar-file-load.6
49    (with-jar-file-init
50      (load "jar:file:baz.jar!/bar"))
51  t)
52
53(deftest jar-file-load.7
54    (with-jar-file-init
55      (load "jar:file:baz.jar!/bar.abcl"))
56  t)
57
58(deftest jar-file-load.8
59    (with-jar-file-init
60      (load "jar:file:baz.jar!/eek"))
61  t)
62
63(deftest jar-file-load.9
64    (with-jar-file-init
65      (load "jar:file:baz.jar!/eek.lisp"))
66  t)
67
68
69(deftest jar-file-probe-file.1
70    (with-jar-file-init
71        (probe-file "jar:file:baz.jar!/eek.lisp"))
72  #p"jar:file:baz.jar!/eek.lisp")
73
74
75(deftest jar-file-merge-pathnames.1
76    (merge-pathnames 
77     "!/foo" #p"jar:file:baz.jar")
78  #p"jar:file:baz.jar!/foo")
79
80
81
82
83
84 
Note: See TracBrowser for help on using the repository browser.