Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 11 additions & 23 deletions binascii.asd
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
; -*- mode: lisp -*-

(cl:defpackage #:binascii-system
(:use :cl :asdf))
(:use :cl :asdf :uiop))

(cl:in-package #:binascii-system)

(asdf:defsystem :binascii
(defsystem "binascii"
:version "1.0"
:author "Nathan Froyd <[email protected]>"
:maintainer "Nathan Froyd <[email protected]>"
Expand All @@ -20,23 +20,15 @@
(:file "base85" :depends-on ("octets"))
(:file "base64" :depends-on ("octets"))
(:file "base32" :depends-on ("octets"))
(:file "base16" :depends-on ("octets"))))

(defmethod perform ((op test-op) (c (eql (find-system :binascii))))
(asdf:oos 'asdf:test-op :binascii-tests))

(defmethod operation-done-p ((op test-op) (c (eql (find-system :binascii))))
nil)
(:file "base16" :depends-on ("octets")))
:in-order-to ((test-op (test-op "binascii/tests"))))

(defclass test-vector-file (static-file)
())

(defmethod source-file-type ((c test-vector-file) (s module)) "testvec")
((type :initform "testvec")))

(asdf:defsystem :binascii-tests
:depends-on (binascii)
(defsystem "binascii/tests"
:depends-on ("binascii")
:version "1.0"
:in-order-to ((test-op (load-op :binascii-tests)))
:components ((:module "tests"
:components
((:file "rt")
Expand All @@ -46,11 +38,7 @@
(:test-vector-file "base64")
(:test-vector-file "base32")
(:test-vector-file "base32hex")
(:test-vector-file "base16")))))

(defmethod operation-done-p ((op test-op) (c (eql (find-system :binascii-tests))))
nil)

(defmethod perform ((op test-op) (c (eql (find-system :binascii-tests))))
(or (funcall (intern "DO-TESTS" (find-package "RTEST")))
(error "TEST-OP failed for BINASCII-TESTS")))
(:test-vector-file "base16"))))
:perform (test-op (o c)
(or (symbol-call :rtest :do-tests)
(error "TEST-OP failed for BINASCII/TESTS"))))