summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-01-28 01:37:05 +0000
committerArun Isaac2023-02-27 23:55:02 +0000
commit10d26f3b35cac5bd27c450fcb99377666a9e2eed (patch)
tree7d0d80e8324ef185bd3dd64889bdd8569b2f49dc
parente902d4703126ddf5603210192d47c37e3b859f13 (diff)
downloadskribilo-10d26f3b35cac5bd27c450fcb99377666a9e2eed.tar.gz
skribilo-10d26f3b35cac5bd27c450fcb99377666a9e2eed.tar.lz
skribilo-10d26f3b35cac5bd27c450fcb99377666a9e2eed.zip
tests: Test ast->string.
* tests/ast.test ("ast->string"): New test.
-rw-r--r--tests/ast.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ast.test b/tests/ast.test
index 1110faf..ed09bb0 100644
--- a/tests/ast.test
+++ b/tests/ast.test
@@ -1,6 +1,7 @@
;;; Excercise the AST routines. -*- Scheme -*-
;;;
;;; Copyright (C) 2009, 2012, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright (C) 2023 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of Skribilo.
;;;
@@ -64,6 +65,10 @@
(null? (cdr body))))))
(null? (cdr body)))))
+(test-equal "ast->string"
+ "Blah."
+ (ast->string (document #:title "Foo" (chapter #:title "Bar" "Blah."))))
+
(test-assert "`find-down' returns the empty list"
(let* ((doc (document (chapter (section)) (chapter (section))))
(lst (find-down (lambda (n) (is-markup? n 'chapter)) doc)))