1
0
Fork 0

Compare commits

...

6 Commits

Author SHA1 Message Date
Craig Oates 05b876bea7 add 'hello' function (for quick test after loading package). 3 years ago
Craig Oates 8f8cd147ce integrate FiveAM into test package def. and main testing file. 3 years ago
Craig Oates 943a912d96 connect fiveAM testing package to main project in .asd file. 3 years ago
Craig Oates 26b025361d remove doc folder. 3 years ago
Craig Oates aa1abec7fe add fiveAM package and create initial test. 3 years ago
Craig Oates 00ba38f3b0 create project files. 3 years ago
  1. 1
      .gitignore
  2. 2
      LICENSE
  3. 4
      README.md
  4. 30
      ritherdon-rest.asd
  5. 4
      src/package.lisp
  6. 6
      src/ritherdon-rest.lisp
  7. 6
      tests/package.lisp
  8. 35
      tests/ritherdon-rest-tests.lisp

1
.gitignore vendored

@ -17,3 +17,4 @@
*.wx64fsl
*.wx32fsl
/.directory

2
LICENSE

@ -1,4 +1,4 @@
MIT License Copyright (c) <year> <copyright holders>
MIT License Copyright (c) 2021 Craig Oates
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

4
README.md

@ -1,3 +1,3 @@
# ritherdon-rest
# Ritherdon REST
A CLI program which grabs data from the Return to Ritherdon project's REST API server.
A CLI program which grabs data from the Return to Ritherdon project's REST API server.

30
ritherdon-rest.asd

@ -0,0 +1,30 @@
;;;; ritherdon-rest.asd
(asdf:defsystem #:ritherdon-rest
:description "Grabs data from the Return to Ritherdon project REST
API and prints out the results."
:author "craig@craigoates.net"
:license "MIT"
:version "0.0.1"
:serial t
:in-order-to ((test-op (test-op "ritherdon-rest/tests")))
:pathname "src/"
:components ((:file "package")
(:file "ritherdon-rest")))
;; The use of '...rest/tests' was because of a warning when trying to
;; run the code in SLIME.
(asdf:defsystem #:ritherdon-rest/tests
:description "The test suite for the ritherdon-rest project."
:author "craig@craigoates.net"
:license "MIT"
:version "0.0.1"
:serial t
:depends-on (:ritherdon-rest :fiveam)
:perform (test-op (o s)
(uiop:symbol-call :fiveam :run!
'ritherdon-rest-tests:all-tests))
:components ((:module "tests"
:serial t
:components ((:file "package")
(:file "ritherdon-rest-tests")))))

4
src/package.lisp

@ -0,0 +1,4 @@
;;;; package.lisp
(defpackage #:ritherdon-rest
(:use #:cl))

6
src/ritherdon-rest.lisp

@ -0,0 +1,6 @@
;;;; ritherdon-rest.lisp
(in-package #:ritherdon-rest)
(defun hello ()
(print "The system is up and running."))

6
tests/package.lisp

@ -0,0 +1,6 @@
;;;; package.lisp
(defpackage #:ritherdon-rest-tests
(:use #:cl #:fiveam)
(:export #:run!
#:all-tests))

35
tests/ritherdon-rest-tests.lisp

@ -0,0 +1,35 @@
;;;; ritherdon-rest-tests.lisp
(in-package #:ritherdon-rest-tests)
(def-suite all-tests
:description "The master suite of all ritherdon-rest tests.")
(in-suite all-tests)
;; These two examples show the 'full' call to the fiveAm test
;; functions. This is just for reference. The 'namespace' is already
;; 'imported' in 'package.lisp'.
;; (fiveam:test sum-1
;; (fiveam:is (= 3 (+ 1 2))))
;; (fiveam:run!)
;; How you would normally create the tests -- with fiveAM already
;; set-up in 'package.lisp' and not needing to be explicit about it
;; here. This is similar to 'using static' in C#.
(defun test-quasi()
(run! 'all-tests))
(test dummy-tests
"Just a placeholder."
(is (listp (list 1 2)))
(is (= 5 (+ 2 3)))
(is (< 4 (+ 100 400))))
(test dummy-tests-two
"This is another placeholder test.
This is just to make sure everything is set-up properly."
(is (equal 4 4)))