aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorMichael Camilleri <mike@inqk.net>2021-01-23 04:41:24 +0900
committerMichael Camilleri <mike@inqk.net>2021-01-23 04:41:24 +0900
commit432aa93c990e60df6dc0e7c466919810e12435e3 (patch)
tree5c22a1428f3585cd059067e27e75e3e3d9935adb /test
parentImprove spacing support in fmt (diff)
Add formatting test for characters after :root
Diffstat (limited to 'test')
-rw-r--r--test/suite0.janet9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/suite0.janet b/test/suite0.janet
index 2cd2f42..df1d7ef 100644
--- a/test/suite0.janet
+++ b/test/suite0.janet
@@ -33,7 +33,14 @@
(buffer/clear b)
(with-dyns [:out b]
(fmt/format-print "# a comment"))
-(pp b)
(assert (deep= b @"# a comment\n\n") "format-print only comment")
+(buffer/clear b)
+(with-dyns [:out b]
+ (try
+ (fmt/format-print "print )")
+ ([err]
+ (print "error"))))
+(assert (deep= b @"error\n") "format-print errors with unbalanced parenthesis")
+
(end-suite)