test-force.script 649 Bytes
Newer Older
1
;;; -*- Lisp -*-
2

3

4

5
(asdf:operate 'asdf:load-op 'test-force)
6

7
8
9
10
(defparameter file1 (test-fasl "file1"))
(defparameter file1-date (file-write-date file1))
(defparameter date1 (- file1-date 600))
(defparameter date2 (- file1-date 300))
11

12
13
(assert file1)
(assert file1-date)
14

15
16
17
18
19
20
;; unforced, date should stay same
(touch-file "test-force.asd" :timestamp date1)
(touch-file "file1.lisp" :timestamp date1)
(touch-file file1 :timestamp date2)
(asdf:operate 'asdf:load-op 'test-force)
(assert (equal (file-write-date file1) date2))
21

22
23
24
;; forced, it should be later
(asdf:operate 'asdf:load-op 'test-force :force t)
(assert (>= (file-write-date file1) file1-date))