(define-module (tests html) #:use-module (src dates) #:use-module (srfi srfi-64) #:use-module ((src html) #:prefix html:)) (test-begin "HTML index page") (define me (html:person "Ekaitz" #:email "ekaitz@elenq.tech" #:uri "https://elenq.tech")) (define index (html:index #:title "Mi feed" #:description "Este es mi feed" #:uri "https://feed.elenq.tech/index.html" #:styles (list "body {color: grey}" (html:media "that.css" #:uri "/that.css")) #:scripts (list "console.log(\"HOLA\")" (html:media "script.js" #:uri "/script.js")) #:author me #:posts (list (html:post #:title "first entry" #:published (string/ISO->date "2023-03-01") #:authors (list me) #:summary-html '(p "Este es el resumen") #:content-html '(p "Este es el contenido") #:categories (list "una" "dos" "tres") #:media (list))))) (let ((html-index (with-output-to-string (lambda () (html:render index))))) (test-assert (string=? (pk html-index) "

Mi feed

first entry

Ekaitz

Este es el resumen

Este es el contenido