feat(tests): set up unit tests
Using FiveAM, and followed this tutorial: https://turtleware.eu/posts/Tutorial-Working-with-FiveAM.html
This commit is contained in:
parent
7f4cb83f75
commit
9be455b2b7
|
@ -1,5 +1,22 @@
|
|||
(asdf:defsystem #:homestead
|
||||
:serial t
|
||||
:description "A static site generator"
|
||||
:author "Gosha Tcherednitchenko"
|
||||
:license "MIT")
|
||||
(defsystem "homestead"
|
||||
:version "0.0.1"
|
||||
:author "Gosha Tcherednitchenko <mail@gosha.net>"
|
||||
:license "MIT License"
|
||||
:depends-on (#:cl-markdown)
|
||||
:components ((:module "src"
|
||||
:components
|
||||
((:file "main"))))
|
||||
:description "A static website generator"
|
||||
:in-order-to ((test-op (test-op "homestead/tests"))))
|
||||
|
||||
(defsystem "homestead/tests"
|
||||
:author "Gosha Tcherednitchenko <mail@gosha.net>"
|
||||
:license "MIT License"
|
||||
:depends-on ("homestead"
|
||||
"fiveam")
|
||||
:components ((:module "tests"
|
||||
:components
|
||||
((:file "main"))))
|
||||
:description "Test system for homestead"
|
||||
:perform (test-op (o s)
|
||||
(uiop:symbol-call :fiveam :run! 'homestead/tests/main:all-tests)))
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
(defpackage homestead
|
||||
(:use :cl))
|
||||
(in-package :homestead)
|
||||
|
||||
;; blah blah blah.
|
|
@ -0,0 +1,21 @@
|
|||
(defpackage homestead/tests/main
|
||||
(:use :cl
|
||||
:homestead
|
||||
:fiveam)
|
||||
(:export #:run! #:all-tests))
|
||||
(in-package #:homestead/tests/main)
|
||||
|
||||
;; NOTE: To run this test file, execute `(asdf:test-system :homestead)' in your Lisp.
|
||||
|
||||
(def-suite all-tests
|
||||
:description "Global test suite")
|
||||
|
||||
(in-suite all-tests)
|
||||
|
||||
(defun test-homestead ()
|
||||
(run! 'all-tests))
|
||||
|
||||
(test dummy-tests
|
||||
"Just a placeholder."
|
||||
(is (listp (list 1 2)))
|
||||
(is (= 5 (+ 2 3))))
|
Loading…
Reference in New Issue