Commit c22a037a authored by pfdietz's avatar pfdietz
Browse files

More test fixups, add test for signaling a warning (not style warning) during compilation

parent 4b69475a
......@@ -6,4 +6,3 @@
(unless (find-class 'compile-file-test-condition.2 nil)
(define-condition compile-file-test-condition.2 (style-warning) nil))
(warn (make-condition 'compile-file-test-condition.2)))
(in-package "CL-TEST")
(defun compile-file-test-fun.2a () nil)
(eval-when (:compile-toplevel)
(unless (find-class 'compile-file-test-condition.2a nil)
(define-condition compile-file-test-condition.2a (warning) nil))
(warn (make-condition 'compile-file-test-condition.2a)))
......@@ -50,7 +50,6 @@
(values
(equalpt (namestring (truename target-pathname))
(namestring output-truename))
(notnot failure-p)
(notnot (fboundp funname))
(progn
(load target-pathname)
......@@ -58,72 +57,77 @@
(deftest compile-file.1
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1)
t nil nil nil)
t nil nil)
(deftest compile-file.2
(compile-file-test "compile-file-test-file-2.lsp" 'compile-file-test-fun.2
:expect-style-warnings t)
t t nil nil)
t nil nil)
(deftest compile-file.2a
(compile-file-test "compile-file-test-file-2a.lsp" 'compile-file-test-fun.2a
:expect-warnings t)
t nil nil)
(deftest compile-file.3
(let ((*package* (find-package "CL-TEST")))
(compile-file-test "compile-file-test-file-3.lsp" 'compile-file-test-fun.3))
t nil nil nil)
t nil nil)
(deftest compile-file.4
(let ((*package* (find-package "CL-USER")))
(compile-file-test "compile-file-test-file-3.lsp" 'cl-user::compile-file-test-fun.3))
t nil nil nil)
t nil nil)
(deftest compile-file.5
(compile-file-test #p"compile-file-test-file.lsp" 'compile-file-test-fun.1)
t nil nil nil)
t nil nil)
(deftest compile-file.6
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:output-file "foo.fasl")
t nil nil nil)
t nil nil)
(deftest compile-file.6a
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:output-file "foo.ufsl")
t nil nil nil)
t nil nil)
(deftest compile-file.7
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:external-format :default)
t nil nil nil)
t nil nil)
(deftest compile-file.8
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:output-file #p"foo.fasl")
t nil nil nil)
t nil nil)
(deftest compile-file.9
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:print t)
t nil nil nil)
t nil nil)
(deftest compile-file.10
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:verbose t)
t nil nil nil)
t nil nil)
(deftest compile-file.11
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:print nil)
t nil nil nil)
t nil nil)
(deftest compile-file.12
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:verbose nil)
t nil nil nil)
t nil nil)
;;; A file stream is a pathname designator
(deftest compile-file.13
(with-open-file (s "compile-file-test-file.lsp" :direction :input)
(compile-file-test s 'compile-file-test-fun.1))
t nil nil nil)
t nil nil)
(deftest compile-file.14
(let ((s (open "foo.fasl" :direction :output :if-exists :supersede
......@@ -131,7 +135,7 @@
(close s)
(compile-file-test "compile-file-test-file.lsp" 'compile-file-test-fun.1
:output-file s))
t nil nil nil)
t nil nil)
;;; Add tests for *compile-file-truename*, *compile-file-pathname*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment