summaryrefslogtreecommitdiff
path: root/tests/ast.test
diff options
context:
space:
mode:
authorLudovic Courtès2012-05-14 00:46:59 +0200
committerLudovic Courtès2012-05-14 01:02:46 +0200
commite47dcdb8340d6c24a7f20107b3f199a8f70020a8 (patch)
tree12ea9446c6983f9135202a1200c1f3c403c5b744 /tests/ast.test
parente10677ed464319816d36f1d545c3111f227b7eab (diff)
downloadskribilo-e47dcdb8340d6c24a7f20107b3f199a8f70020a8.tar.gz
skribilo-e47dcdb8340d6c24a7f20107b3f199a8f70020a8.tar.lz
skribilo-e47dcdb8340d6c24a7f20107b3f199a8f70020a8.zip
ast: Add `node-children'.
* src/guile/skribilo/ast.scm (node-children): New procedure. * tests/ast.test ("node-children"): New test.
Diffstat (limited to 'tests/ast.test')
-rw-r--r--tests/ast.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/ast.test b/tests/ast.test
index cb18e3f..596d9d3 100644
--- a/tests/ast.test
+++ b/tests/ast.test
@@ -1,6 +1,6 @@
;;; Excercise the AST routines. -*- Scheme -*-
;;;
-;;; Copyright (C) 2009 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright (C) 2009, 2012 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of Skribilo.
;;;
@@ -99,6 +99,17 @@
(equal? (map markup-ident lst)
(map number->string (iota 2))))))
+(test-assert "node-children"
+ (let* ((doc (document
+ (chapter #:ident "0" (section #:ident "s"))
+ (list (chapter #:ident "1"))
+ "hey"
+ (list "foo"
+ (chapter #:ident "2"))))
+ (lst (node-children doc)))
+ (equal? (map markup-ident lst)
+ '("0" "1" "2"))))
+
(test-end "ast")