Add additional MIRROR-IMG test

This one makes sure output is the same, regardless
as to whether or not files have already been
mirrored.
This commit is contained in:
Jaidyn Ann 2024-05-31 23:22:14 -05:00
parent 359696e5e2
commit cd1c603c8a

View File

@ -44,11 +44,10 @@ systems path."
(error (c)
(hunchentoot:stop server)
c)))))
(define-test mirror-img (:tags '(mirror-img))
(assert-eq
'T
(stringp
(setq *mirror-img-result*
(defun call-mirror-img ()
"Invoke MIRROR-IMG:MIRROR-IMG, using our own parameters.
Used in the tests MIRROR-IMG and MIRROR-IMG.ALREADY-DOWNLOADED."
(let* ((html-path (relative-pathname "t/testing-website/index.html"))
(download-dir (relative-pathname "t/tmp/"))
(html-url "http://localhost:4242")
@ -57,7 +56,17 @@ systems path."
download-dir)))
(mirror-img:mirror-img html-path download-dir
:url-dir url-dir
:html-url html-url))))))
:html-url html-url)))
(define-test mirror-img (:tags '(mirror-img))
(assert-eq
'T
(stringp (setq *mirror-img-result* (call-mirror-img)))))
(define-test mirror-img.already-downloaded (:tags '(mirror-img))
(assert-equal
*mirror-img-result*
(call-mirror-img)))
(define-test mirror-img.files-mirrored (:tags '(mirror-img))
(assert-equal