Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
asdf
asdf
Commits
3a73624e
Commit
3a73624e
authored
Jan 15, 2013
by
Francois-Rene Rideau
Browse files
Frob tests
parent
a1b0e53c
Changes
4
Hide whitespace changes
Inline
Side-by-side
test/static-and-serial.asd
deleted
100644 → 0
View file @
a1b0e53c
#|
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"
)))
test/test-compile-file-failure.script
View file @
3a73624e
...
...
@@ -2,8 +2,6 @@
(load "script-support.lisp")
(load-asdf)
(trace d:match-any-condition-p)
(with-test ()
#-gcl<2.7
(assert (handler-case
...
...
test/test-encodings.script
View file @
3a73624e
...
...
@@ -46,14 +46,10 @@
#-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
...
...
@@ -62,19 +58,20 @@
(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
...
...
test/test-static-and-serial.script
View file @
3a73624e
...
...
@@ -10,22 +10,34 @@ don't cause full rebuilds all the time...
(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))))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment