miniblog

Miniblog: A command-line static blog system in Common Lisp
Log | Files | Refs | README | LICENSE

edit.lisp (522B)


      1 (in-package :miniblog/tests)
      2 
      3 (in-suite miniblog-test)
      4 
      5 (test get-title-and-content
      6   "Verify GET-TITLE-AND-CONTENT extracts the title and body as expected"
      7   (let* ((title "Test title")
      8          (body (format nil "Line 1~%Line 2~%Line 3"))
      9          (content (format nil "~a~%~%~a~%" title body))
     10          (output (miniblog.edit:get-title-and-content content)))
     11     (format t "\"~a\"~%\"~a\"~%" (car output) (str:trim (cadr output)))
     12     (is (and (string= title (car output))
     13              (string= body (cadr output))))))