aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-01-26 21:54:31 -0500
committerGravatar Peter McGoron 2025-01-26 21:54:31 -0500
commita688e0fd3144243efeb6022898703640ae391d86 (patch)
treef4a7a04359f981d3eb5e708c2b32a6d20ad33d09 /tests
parentparsing tests (diff)
fix tight nesting of block quotes
Diffstat (limited to '')
-rw-r--r--tests/run.scm28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm
index ef1c172..bc67ab6 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -140,4 +140,30 @@
(chain (node-children block)
(list-queue-list _)
(list-ref _ 0)
- (xstring->string _)))))
+ (xstring->string _))))
+ (test-group "two nested without spaces"
+ (define block
+ (chain (parse->document ">> hello, world" #f)
+ (parse->document ">> continuing nested" _)
+ (parse->document "> at first level" _)
+ (parse->document "> continuing first level" _)
+ (node-children _)
+ (list-queue-list _)
+ (list-ref _ 0)))
+ (test-assert "first block quote" (block-quote? block))
+ (test-equal "first block quote paragraph"
+ "at first level\ncontinuing first level\n"
+ (chain (node-children block)
+ (list-queue-list _)
+ (list-ref _ 1)
+ (xstring->string _)))
+ (define nested-str (chain (node-children block)
+ (list-queue-list _)
+ (list-ref _ 0)
+ (node-children _)
+ (list-queue-list _)
+ (list-ref _ 0)
+ (xstring->string _)))
+ (test-equal "nested block quote paragraph"
+ "hello, world\ncontinuing nested\n"
+ nested-str)))