aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorMichael Camilleri <mike@inqk.net>2021-01-23 03:14:34 +0900
committerMichael Camilleri <mike@inqk.net>2021-01-23 03:14:34 +0900
commita9fb13c23f08832ce9d5f22291bdc93ff26c5477 (patch)
treedd9c90277b20792b25e2a73d05e7937bf3a2fe2c /test
parentMerge pull request #21 from pepe/fix-fmt-removing (diff)
Improve spacing support in fmt
Diffstat (limited to 'test')
-rw-r--r--test/suite0.janet11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/suite0.janet b/test/suite0.janet
index 4430ca7..2cd2f42 100644
--- a/test/suite0.janet
+++ b/test/suite0.janet
@@ -25,4 +25,15 @@
(fmt/format-print "()"))
(assert (deep= b @"()\n") "format-print ()")
+(buffer/clear b)
+(with-dyns [:out b]
+ (fmt/format-print "( )"))
+(assert (deep= b @"()\n") "format-print ( )")
+
+(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")
+
(end-suite)