+++ /dev/null
-#|
-make sure that serial t and static-files don't cause full rebuilds all
-the time...
-|#
-
-(defsystem static-and-serial
- :version "0.1"
- :serial t
- :components
- ((:static-file "file2.lisp")
- (:static-file "run-tests.sh")
- (:file "file1")))
(load "script-support.lisp")
(load-asdf)
-(trace d:match-any-condition-p)
-
(with-test ()
#-gcl<2.7
(assert (handler-case
#-asdf-unicode
(leave-test "No Unicode support to test on this lisp implementation" 0)
- (unless (find-system :asdf-encodings nil)
- (leave-test "ASDF-ENCODINGS is not installed next to ASDF. Skipping the rest the test." 0))
-
;; NB: recent clozure can autodetect without asdf-encodings with :default (!)
- #+(and asdf-unicode sbcl)
+ #+sbcl
(progn
- #+clozure (setf ccl:*default-external-format* :latin3)
#+sbcl (setf sb-impl::*default-external-format* :latin-3)
(with-encoding-test (:default)
(defsystem :test-encoding-explicit-default
(defsystem :test-encoding-implicit-default
:components ((:file "lambda")))))
- #+asdf-unicode
- (progn
- ;; BEWARE: For testing purposes, we assume ASDF-ENCODINGS is under the same root as ASDF.
- (pushnew (asdf::subpathname *asdf-directory* "../asdf-encodings/") asdf:*central-registry*)
- (asdf:load-system :asdf-encodings)
- #-lispworks
- (with-encoding-test (:latin-2)
- (defsystem :test-encoding-implicit-autodetect
- :components ((:file "lambda"))))
- #+sbcl
- (with-encoding-test (:koi8-r)
- (defsystem :test-encoding-explicit-koi8-r
- :components ((:file "lambda" :encoding :koi8-r)))))
+ ;; BEWARE: For testing purposes, we assume ASDF-ENCODINGS is under the same root as ASDF.
+ (pushnew (asdf::subpathname *asdf-directory* "../asdf-encodings/") asdf:*central-registry*)
+ (unless (find-system :asdf-encodings nil)
+ (leave-test "ASDF-ENCODINGS is not installed next to ASDF. Skipping the rest the test." 0))
+
+ (asdf:load-system :asdf-encodings)
+ #-lispworks
+ (with-encoding-test (:latin-2)
+ (defsystem :test-encoding-implicit-autodetect
+ :components ((:file "lambda"))))
+ #+sbcl
+ (with-encoding-test (:koi8-r)
+ (defsystem :test-encoding-explicit-koi8-r
+ :components ((:file "lambda" :encoding :koi8-r))))
(with-encoding-test (:utf-8)
(defsystem :test-file-encoding-u8
(with-test ()
- (load-test-system 'static-and-serial)
+ (let ((s '(defsystem static-and-serial
+ :version "0.1"
+ :serial t
+ :components
+ ((:static-file "file2.lisp")
+ (:static-file "run-tests.sh")
+ (:file "file1")))))
+ (eval s)
+ (load-test-system 'static-and-serial)
- (let* ((file1 (asdf:compile-file-pathname* "file1.lisp"))
- (file1-date (file-write-date file1))
- (date1 (- file1-date 600))
- (date2 (- file1-date 300))
- (date3 (- file1-date 150)))
+ (let* ((file1 (asdf:compile-file-pathname* "file1.lisp"))
+ (file1-date (file-write-date file1))
+ (date1 (- file1-date 600))
+ (date2 (- file1-date 300))
+ (date3 (- file1-date 150)))
- (assert file1-date)
- (format t "file: ~S~%date: ~S~%" file1 file1-date)
+ (assert file1-date)
+ (assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
+ (format t "file: ~S~%date: ~S~%" file1 file1-date)
- ;; date should stay same
- (clear-system 'static-and-serial)
- (touch-file "static-and-serial.asd" :offset -10000)
- (touch-file "file2.lisp" :timestamp date1)
- (touch-file "file1.lisp" :timestamp date2)
- (touch-file file1 :timestamp date3)
- (DBG "load again" (oos 'load-op 'static-and-serial))
- (assert-equal (file-write-date file1) date3)))
+ ;; date should stay same
+ (clear-system 'static-and-serial)
+ (delete-package :test-package)
+ (eval s)
+ (touch-file "file2.lisp" :timestamp date1)
+ (touch-file "run-tests.sh" :timestamp date1)
+ (touch-file "file1.lisp" :timestamp date2)
+ (touch-file file1 :timestamp date3)
+ (DBG "load again" (oos 'load-op 'static-and-serial))
+ (assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
+ (assert-equal (file-write-date file1) date3))))