Commit 29d10949 authored by Gary King's avatar Gary King
Browse files

Added &allow-other-keys to operate. Added test/test-force to test that forcing...

Added &allow-other-keys to operate. Added test/test-force to test that forcing a system works (at least in a simple case).
parent 1cf58c2f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
;;; This is asdf: Another System Definition Facility.  $Revision: 1.97 $
;;; This is asdf: Another System Definition Facility.  $Revision: 1.98 $
;;;
;;; Feedback, bug reports, and patches are all welcome: please mail to
;;; <cclan-list@lists.sf.net>.  But note first that the canonical
@@ -109,7 +109,7 @@

(in-package #:asdf)

(defvar *asdf-revision* (let* ((v "$Revision: 1.97 $")
(defvar *asdf-revision* (let* ((v "$Revision: 1.98 $")
			       (colon (or (position #\: v) -1))
			       (dot (position #\. v)))
			  (and v colon dot 
@@ -828,7 +828,8 @@ system."))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; invoking operations

(defun operate (operation-class system &rest args &key (verbose t) version)
(defun operate (operation-class system &rest args &key (verbose t) version 
                                &allow-other-keys)
  (let* ((op (apply #'make-instance operation-class
		    :original-initargs args
		    args))

test/test-force.asd

0 → 100644
+5 −0
Original line number Diff line number Diff line
;;; -*- Lisp -*-
(asdf:defsystem test-force
  :components
  ((:file "file1")))

test/test-force.script

0 → 100644
+16 −0
Original line number Diff line number Diff line
;;; -*- Lisp -*-
(load "../asdf")
(setf asdf:*central-registry* '(*default-pathname-defaults*))

(asdf:operate 'asdf:load-op 'test-force)
(defvar file1-date (file-write-date (compile-file-pathname "file1")))

;; unforced, date should stay same
(sleep 1)
(asdf:operate 'asdf:load-op 'test-force)
(assert (= (file-write-date (compile-file-pathname "file1")) file1-date))

;; forced, it should be later
(sleep 1)
(asdf:operate 'asdf:load-op 'test-force :force t)
(assert (> (file-write-date (compile-file-pathname "file1")) file1-date))