File: test3.script

package info (click to toggle)
cl-asdf 1.111-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 428 kB
  • ctags: 189
  • sloc: lisp: 1,395; sh: 128; makefile: 41
file content (26 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;; -*- Lisp -*-
#+(or f1 f2)
    (error "This test cannot run if :f1 or :f2 are on *features*")
(load "script-support")
(load "../asdf")
(in-package :asdf)
(cl-user::exit-on-error 
 (asdf:run-shell-command "rm ~A ~A"
			 (namestring (compile-file-pathname "file1"))
			 (namestring (compile-file-pathname "file2")))
 (setf asdf:*central-registry* '(*default-pathname-defaults*))
 (handler-case 
     (asdf:oos 'asdf:load-op 'test3)
   (asdf:missing-dependency (c)
     (format t "first test failed as expected: - ~%~A~%" c))
   (:no-error (c) (error "should have failed, oops")))
 (pushnew :f1 *features*)
 (asdf:oos 'asdf:load-op 'test3)
 (assert (probe-file (compile-file-pathname "file1")))
 (assert (not (probe-file (compile-file-pathname "file2"))))
 (run-shell-command "rm ~A" (namestring (compile-file-pathname "file1")))
 (setf *features* (cons :f2 (cdr *features*)))
 (asdf:oos 'asdf:load-op 'test3)
 (assert (probe-file (compile-file-pathname "file2")))
 (assert (not (probe-file (compile-file-pathname "file1"))))
 )