tests/tests.lisp (937 bytes)
1 (defpackage :coleslaw-tests 2 (:use :cl :prove)) 3 4 (in-package :coleslaw-tests) 5 6 (plan 4) 7 8 (diag "COLESLAW-CONF:*BASEDIR* points to Coleslaw's top level directory") 9 (is (car (last (pathname-directory coleslaw-conf:*basedir*))) 10 "coleslaw" :test #'string=) 11 (ok (probe-file (merge-pathnames #P"plugins" coleslaw-conf:*basedir*)) 12 "COLESLAW-CONF:*BASEDIR* has a plugins sub-directory") 13 (ok (probe-file (merge-pathnames #P"themes" coleslaw-conf:*basedir*)) 14 "COLESLAW-CONF:*BASEDIR* has a themes sub-directory") 15 16 17 (coleslaw::load-config (asdf:system-relative-pathname :coleslaw-test "tests/files/")) 18 19 (with-open-file (in (asdf:system-relative-pathname :coleslaw-test "tests/files/127.txt")) 20 (diag "PARSE-METADATA should handle files with CR-LF line endings.") 21 (is (coleslaw::parse-metadata in) '(:TITLE "We should handle CR-LF" :TAGS "fixtures" :DATE "2014-12-16" :FORMAT 22 "md" :EXCERPT "An excerpt") :test 'equalp)) 23 24 (finalize)