From 7221ccf9edd1ebde56a7915a338dacf537e8f3fb Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 26 May 2009 19:02:01 +0200 Subject: Make sure to bind nodes that are in the body of non-markup nodes. * src/guile/skribilo/ast.scm (document-bind-nodes!): Traverse other nodes as well, such as processors. * src/guile/skribilo/resolve.scm (do-resolve!>): Likewise. * tests/resolve.test ("resolved nested document bindings"): New test. --- tests/resolve.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/resolve.test') diff --git a/tests/resolve.test b/tests/resolve.test index 864ac88..18408e8 100644 --- a/tests/resolve.test +++ b/tests/resolve.test @@ -192,6 +192,17 @@ (eq? (ast-parent x) sub) (eq? (ast-document x) sub)))))) +(test-assert "node bindings in processor body" + (let* ((doc (document #:title "Doc" + (processor #:combinator (lambda (e1 e2) e1) + (chapter #:ident "c"))))) + (resolve! doc %engine '()) + (let* ((proc (car (markup-body doc))) + (ch (car (markup-body proc))) + (ch* (document-lookup-node doc "c"))) + (format (current-error-port) "~A vs ~A~%" ch ch*) + (eq? ch ch*)))) + (test-end "resolve") -- cgit v1.2.3