aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2020-11-18 08:51:59 -0600
committerCalvin Rose <calsrose@gmail.com>2020-11-18 08:53:45 -0600
commit72a304177c6ecc33eb134810147f0522c5d056e6 (patch)
tree11a1635fc06f04c1c9675f0da2aaaa12c4b52c47 /test
parentFix #7. Fix comment in final position inside structure. (diff)
Handle empty tuple.
Diffstat (limited to 'test')
-rw-r--r--test/suite0.janet9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/suite0.janet b/test/suite0.janet
index 1fc4b44..f5bf558 100644
--- a/test/suite0.janet
+++ b/test/suite0.janet
@@ -13,11 +13,16 @@
(buffer/clear b)
(with-dyns [:out b]
(fmt/format-print "{:a 0\n:b 1 # test comment\n}"))
-(assert (deep= b @"{:a 0\n :b 1 # test comment\n}\n") "format-print comment in collection")
+(assert (deep= b @"{:a 0\n :b 1 # test comment\n}\n") "format-print comment in collection 1")
(buffer/clear b)
(with-dyns [:out b]
(fmt/format-print "[:a 0\n:b\n# test comment\n]"))
-(assert (deep= b @"[:a 0\n :b\n # test comment\n]\n") "format-print comment in collection")
+(assert (deep= b @"[:a 0\n :b\n # test comment\n]\n") "format-print comment in collection 2")
+
+(buffer/clear b)
+(with-dyns [:out b]
+ (fmt/format-print "()"))
+(assert (deep= b @"()\n") "format-print ()")
(end-suite)