summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/stdlib/tstrformat.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stdlib/tstrformat.nim b/tests/stdlib/tstrformat.nim
new file mode 100644
index 000000000..4e5c614a7
--- /dev/null
+++ b/tests/stdlib/tstrformat.nim
@@ -0,0 +1,13 @@
+discard """
+    action: "run"
+"""
+
+import strformat
+
+type Obj = object
+
+proc `$`(o: Obj): string = "foobar"
+
+var o: Obj
+doAssert fmt"{o}" == "foobar"
+doAssert fmt"{o:10}" == "foobar    "
\ No newline at end of file