/usr/share/doc/cl-asdf/examples/test-around-compile.script is in cl-asdf 2:3.1.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ;;; -*- Lisp -*-
(defun call-in-base-2 (thunk)
(let ((*read-base* 2))
(funcall thunk)))
(DBG "Testing around-compile with a function name")
(def-test-system test-around-compile
:around-compile call-in-base-2
;; :depends-on ((:version :asdf "2.017.18")) ; no :around-compile before that.
:components ((:file "test")))
(load-system 'test-around-compile :force t)
(assert-equal 3 (funcall 'add10 1)) ;; add10 must have been compiled in base 2
(fmakunbound 'add10)
(DBG "Testing around-compile with a lambda")
(def-test-system test-around-compile-lambda
:around-compile (lambda (thunk)
(let ((*read-base* 9))
(funcall thunk)))
:components ((:file "test")))
(load-system 'test-around-compile-lambda :force t)
(assert-equal 10 (funcall 'add10 1)) ;; add10 must have been compiled in base 16
|