about summary refs log tree commit diff
path: root/boot/tests
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-07-06 03:57:37 +0200
committerMel <mel@rnrd.eu>2025-07-06 03:57:37 +0200
commit660808af50780dae5292c8064d5bddd77246c52b (patch)
treee8ee1f609977e116c0766b2344310f682bbe639a /boot/tests
parentebd176b8e7eb14060375a28d6ac50500d9d2c808 (diff)
downloadcatskill-660808af50780dae5292c8064d5bddd77246c52b.tar.zst
catskill-660808af50780dae5292c8064d5bddd77246c52b.zip
Correct handling of empty block nodes
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/tests')
-rw-r--r--boot/tests/parse/empty_block.cskt33
-rw-r--r--boot/tests/parse/variadic_parameters.cskt3
2 files changed, 34 insertions, 2 deletions
diff --git a/boot/tests/parse/empty_block.cskt b/boot/tests/parse/empty_block.cskt
new file mode 100644
index 0000000..c3a203a
--- /dev/null
+++ b/boot/tests/parse/empty_block.cskt
@@ -0,0 +1,33 @@
+check for correct handling of empty blocks
+
+<<<
+
+{
+
+}
+
+{ {} }
+{{{}}}
+
+{
+{
+}
+}
+
+{}
+
+>>>
+
+(block)
+(block
+	(block)
+)
+(block
+	(block
+		(block)
+	)
+)
+(block
+	(block)
+)
+(block)
\ No newline at end of file
diff --git a/boot/tests/parse/variadic_parameters.cskt b/boot/tests/parse/variadic_parameters.cskt
index 3b718a1..e002c93 100644
--- a/boot/tests/parse/variadic_parameters.cskt
+++ b/boot/tests/parse/variadic_parameters.cskt
@@ -9,5 +9,4 @@ printf = fun (format string, ...args any) {
 
 >>>
 
-(expr (binary = (expr (name printf)) (expr (function (param format) (type name string) (param args) (type variadic name any) (block
-)))))
\ No newline at end of file
+(expr (binary = (expr (name printf)) (expr (function (param format) (type name string) (param args) (type variadic name any) (block)))))
\ No newline at end of file