summaryrefslogtreecommitdiff
path: root/test/tifmt.myr
diff options
context:
space:
mode:
Diffstat (limited to 'test/tifmt.myr')
-rw-r--r--test/tifmt.myr8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/tifmt.myr b/test/tifmt.myr
index 01a3fbb..cd02fd5 100644
--- a/test/tifmt.myr
+++ b/test/tifmt.myr
@@ -20,6 +20,14 @@ const main = {
checkfmt(ctx, "%i%p1%d-%p2%d-%p3%s", params, "124-244-abc")
}],
+ /* literals */
+ [.name="litint-1", .fn={ctx
+ checkfmt(ctx, "%{5}%d", [`termdraw.Int 9][:], "5")
+ }],
+ [.name="litint-2", .fn={ctx
+ checkfmt(ctx, "%{5}%{6}%d", [`termdraw.Int 9][:], "6")
+ }],
+
/* numeric */
[.name="arith-add", .fn={ctx; binop(ctx, 'd', '+', 10, 21, "31")}],
[.name="arith-sub", .fn={ctx; binop(ctx, 'd', '-', 21, 10, "-11")}],