aboutsummaryrefslogtreecommitdiffstats
path: root/tests/run.scm
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-02-04 10:26:28 -0500
committerGravatar Peter McGoron 2025-02-04 10:26:28 -0500
commitcbb20bcbeb3be06ddfa880bf826f345a9df950c5 (patch)
tree39722dc5773a3d26c6d250fde23a10d34baea92d /tests/run.scm
parentChange handling of paragraph breaks, compress tests (diff)
Rewrite tests to conform to greedy behavior for paragraph breaksHEADmaster
Paragraph breaks will be associated with the deepest child that will accept them. These paragraph breaks can be moved around in a post-processing pass over the tree (which must happen anyways to parse inline syntax). This also allows for child-type-dependent processing of paragraph breaks.
Diffstat (limited to 'tests/run.scm')
-rw-r--r--tests/run.scm15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/run.scm b/tests/run.scm
index d903454..bbfba4c 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -349,15 +349,15 @@
(test-parse->document "* hello,")
(test-parse->document "" _)
(test-parse->document "world" _)
- (test-node-list "document children" 3 _)
+ (test-node-list "document children" 2 _)
(fork
"list item"
_
(chain-lambda (test-child "list item" unordered-list-item? 0 _)
- (test-node-list "items" 1 _)
- (test-child-string "xstring?" 0 "hello,\n" _)))
- (test-paragraph-break "break" 1 _)
- (test-child-string "paragraph" 2 "world\n" _))
+ (test-node-list "items" 2 _)
+ (test-child-string "xstring?" 0 "hello,\n" _)
+ (test-paragraph-break "break" 1 _)))
+ (test-child-string "paragraph" 1 "world\n" _))
(with-test-chain "multiple list elements"
(test-parse->document "* h")
(test-parse->document " el" _)
@@ -456,7 +456,7 @@
_
(chain-lambda (test-child "unordered list?" unordered-list-item? 0 _)
(test-node-list "children" 1 _)
- (test-child-string "xstring?" 0 "hello\n")))
+ (test-child-string "xstring?" 0 "hello\n" _)))
(fork
"thematic break"
_
@@ -465,7 +465,8 @@
"third list item"
_
(chain-lambda (test-child "unordered list?" unordered-list-item? 2 _)
- (test-node-list "children" 1 "world\n" _))))
+ (test-node-list "children" 1 _)
+ (test-child-string "xstring?" 0 "world\n" _))))
(with-test-chain "interrupt paragraph"
(test-parse->document "hello")
(test-parse->document "***" _)