Commit 5a7ed0f3 authored by Mark's avatar Mark
Browse files

Introduce a basic test framework

Tests may be invoked via

   (asdf:test-system :cl-site)

Start exporting symbols from CL-SITE package to denote the external
API will expect others to use us by.  Currently, this consists of the
MAKE-SITE function which is tested in <file:t/site.lisp>.
parent 14d6207b
Loading
Loading
Loading
Loading
+19 −4
Changes for cl-site.asd: 19 added lines, 4 removed lines.
Original line number Diff line number Diff line
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-

(defpackage #:cl-site
  (:use :cl))
(in-package :cl-user)

(asdf:defsystem "cl-site"
(asdf:defsystem cl-site
  :name "cl-site"
  :version "0.0.1"
  :maintainer "C. Yang"
@@ -14,8 +11,26 @@

  :depends-on (:cl-mustache)

  :components ((:module source
                        :pathname ""
                        :serial t
                        :depends-on (package)
                        :components ((:file "globals")
                                     (:file "helpers")
                                     (:file "process")
                                     (:file "main")))
               (:module package
                        :pathname ""
                        :components ((:file "package"))))
  :in-order-to ((asdf:test-op (asdf:test-op cl-site/t))))

(asdf:defsystem cl-site/t
  :defsystem-depends-on (prove-asdf)
  :depends-on (cl-site prove)
  :components ((:module site
                        :pathname "t/"
                        :components ((:test-file "site"))))
  :perform (asdf:test-op (op c)
                         (uiop:symbol-call :prove-asdf 'run-test-system c)))

package.lisp

0 → 100644
+6 −0
Changes for package.lisp: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
(defpackage #:cl-site
  (:use :cl)
  (:export
   #:make-site))

t/site.lisp

0 → 100644
+6 −0
Changes for t/site.lisp: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
(prove:plan 1)

(prove:ok
 (cl-site:make-site))

(prove:finalize)