summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-01-10 10:01:47 +0100
committerAraq <rumpf_a@web.de>2018-01-10 10:01:47 +0100
commit50fb98d2607f5473ab83f5d8293c9a243eb4d7c8 (patch)
treec75805ce238736ae06d09806bbf41c2af7137370 /tests
parent13e9f8aac1b8636c6a45b07c72fc27c1b311e824 (diff)
parenta54430ea2dc7d39670e0451a04d3b9f349ae8072 (diff)
downloadNim-50fb98d2607f5473ab83f5d8293c9a243eb4d7c8.tar.gz
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'tests')
-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