35 |
(*standard-output* str) |
(*standard-output* str) |
36 |
(apply #'compile-file file :allow-other-keys t args)))))) |
(apply #'compile-file file :allow-other-keys t args)))))) |
37 |
(assert (= (length vals) 3)) |
(assert (= (length vals) 3)) |
|
(assert (or print verbose (string= str "")) () |
|
|
"PRINT and VERBOSE are NIL and str is not empty: ~A" |
|
|
str) |
|
|
(assert (or (not verbose) (position #\; str))) |
|
38 |
(destructuring-bind |
(destructuring-bind |
39 |
(output-truename warnings-p failure-p) |
(output-truename warnings-p failure-p) |
40 |
vals |
vals |
|
(assert (if actual-warnings-p failure-p t)) |
|
|
(assert (if expect-warnings failure-p t)) |
|
|
(assert (if expect-style-warnings warnings-p t)) |
|
41 |
(print (namestring (truename target-pathname))) |
(print (namestring (truename target-pathname))) |
42 |
(print (namestring output-truename)) |
(print (namestring output-truename)) |
43 |
(values |
(values |
44 |
(equalpt (namestring (truename target-pathname)) |
(let ((v1 (or print verbose (string= str ""))) |
45 |
(namestring output-truename)) |
(v2 (or (not verbose) (position #\; str))) |
46 |
(notnot (fboundp funname)) |
(v3 (if actual-warnings-p failure-p t)) |
47 |
|
(v4 (if expect-warnings failure-p t)) |
48 |
|
(v5 (if expect-style-warnings warnings-p t)) |
49 |
|
(v6 (or (null output-truename) (pathnamep output-truename))) |
50 |
|
(v7 (equalpt (namestring (truename target-pathname)) |
51 |
|
(namestring output-truename))) |
52 |
|
(v8 (not (fboundp funname)))) |
53 |
|
(if (and v1 v2 v3 v4 v5 v6 v7 v8) t |
54 |
|
(list v1 v2 v3 v4 v5 v6 v7 v8))) |
55 |
(progn |
(progn |
56 |
(load target-pathname) |
(load target-pathname) |
57 |
(funcall funname))))))) |
(funcall funname))))))) |
58 |
|
|
59 |
(deftest compile-file.1 |
(deftest compile-file.1 |
60 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1) |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1) |
61 |
t nil nil) |
t nil) |
62 |
|
|
63 |
(deftest compile-file.2 |
(deftest compile-file.2 |
64 |
(compile-file-test "compile-file-test-file-2.lsp" 'compile-file-test-fun.2 |
(compile-file-test "compile-file-test-file-2.lsp" 'compile-file-test-fun.2 |
65 |
:expect-style-warnings t) |
:expect-style-warnings t) |
66 |
t nil nil) |
t nil) |
67 |
|
|
68 |
(deftest compile-file.2a |
(deftest compile-file.2a |
69 |
(compile-file-test "compile-file-test-file-2a.lsp" 'compile-file-test-fun.2a |
(compile-file-test "compile-file-test-file-2a.lsp" 'compile-file-test-fun.2a |
70 |
:expect-warnings t) |
:expect-warnings t) |
71 |
t nil nil) |
t nil) |
72 |
|
|
73 |
(deftest compile-file.3 |
(deftest compile-file.3 |
74 |
(let ((*package* (find-package "CL-TEST"))) |
(let ((*package* (find-package "CL-TEST"))) |
75 |
(compile-file-test "compile-file-test-file-3.lsp" 'compile-file-test-fun.3)) |
(compile-file-test "compile-file-test-file-3.lsp" 'compile-file-test-fun.3)) |
76 |
t nil nil) |
t nil) |
77 |
|
|
78 |
(deftest compile-file.4 |
(deftest compile-file.4 |
79 |
(let ((*package* (find-package "CL-USER"))) |
(let ((*package* (find-package "CL-USER"))) |
80 |
(compile-file-test "compile-file-test-file-3.lsp" 'cl-user::compile-file-test-fun.3)) |
(compile-file-test "compile-file-test-file-3.lsp" 'cl-user::compile-file-test-fun.3)) |
81 |
t nil nil) |
t nil) |
82 |
|
|
83 |
(deftest compile-file.5 |
(deftest compile-file.5 |
84 |
(compile-file-test #p"compile-file-test-file.lsp" 'compile-file-test-fun.1) |
(compile-file-test #p"compile-file-test-file.lsp" 'compile-file-test-fun.1) |
85 |
t nil nil) |
t nil) |
86 |
|
|
87 |
(deftest compile-file.6 |
(deftest compile-file.6 |
88 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
89 |
:output-file "foo.fasl") |
:output-file "foo.fasl") |
90 |
t nil nil) |
t nil) |
91 |
|
|
92 |
(deftest compile-file.6a |
(deftest compile-file.6a |
93 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
94 |
:output-file "foo.ufsl") |
:output-file "foo.ufsl") |
95 |
t nil nil) |
t nil) |
96 |
|
|
97 |
(deftest compile-file.7 |
(deftest compile-file.7 |
98 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
99 |
:external-format :default) |
:external-format :default) |
100 |
t nil nil) |
t nil) |
101 |
|
|
102 |
(deftest compile-file.8 |
(deftest compile-file.8 |
103 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
104 |
:output-file #p"foo.fasl") |
:output-file #p"foo.fasl") |
105 |
t nil nil) |
t nil) |
106 |
|
|
107 |
(deftest compile-file.9 |
(deftest compile-file.9 |
108 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
109 |
:print t) |
:print t) |
110 |
t nil nil) |
t nil) |
111 |
|
|
112 |
(deftest compile-file.10 |
(deftest compile-file.10 |
113 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
114 |
:verbose t) |
:verbose t) |
115 |
t nil nil) |
t nil) |
116 |
|
|
117 |
(deftest compile-file.11 |
(deftest compile-file.11 |
118 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
119 |
:print nil) |
:print nil) |
120 |
t nil nil) |
t nil) |
121 |
|
|
122 |
(deftest compile-file.12 |
(deftest compile-file.12 |
123 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
124 |
:verbose nil) |
:verbose nil) |
125 |
t nil nil) |
t nil) |
126 |
|
|
127 |
;;; A file stream is a pathname designator |
;;; A file stream is a pathname designator |
128 |
(deftest compile-file.13 |
(deftest compile-file.13 |
129 |
(with-open-file (s "compile-file-test-file.lsp" :direction :input) |
(with-open-file (s "compile-file-test-file.lsp" :direction :input) |
130 |
(compile-file-test s 'compile-file-test-fun.1)) |
(compile-file-test s 'compile-file-test-fun.1)) |
131 |
t nil nil) |
t nil) |
132 |
|
|
133 |
(deftest compile-file.14 |
(deftest compile-file.14 |
134 |
(let ((s (open "foo.fasl" :direction :output :if-exists :supersede |
(let ((s (open "foo.fasl" :direction :output :if-exists :supersede |
136 |
(close s) |
(close s) |
137 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1 |
138 |
:output-file s)) |
:output-file s)) |
139 |
t nil nil) |
t nil) |
140 |
|
|
141 |
|
(deftest compile-file.15 |
142 |
|
(let ((*readtable* (copy-readtable nil))) |
143 |
|
(set-macro-character #\! (get-macro-character #\')) |
144 |
|
(compile-file-test "compile-file-test-file-4.lsp" 'compile-file-test-fun.4)) |
145 |
|
t foo) |
146 |
|
|
147 |
;;; Add tests for *compile-file-truename*, *compile-file-pathname* |
;;; Add tests for *compile-file-truename*, *compile-file-pathname* |
148 |
|
|