diff options
author | Oscar Nihlgård <oscarnihlgard@gmail.com> | 2018-01-09 00:33:39 +0100 |
---|---|---|
committer | Oscar Nihlgård <oscarnihlgard@gmail.com> | 2018-01-09 00:33:39 +0100 |
commit | 624bd847fb2dfdeca00548947ba248a7b32d2e03 (patch) | |
tree | 65ac11f8f03e8c70aa67242591a9088e1da71e18 /tests/stdlib/tstrformat.nim | |
parent | cde3a4f586f5d22bd7acc8849543821a1830008f (diff) | |
download | Nim-624bd847fb2dfdeca00548947ba248a7b32d2e03.tar.gz |
Add test case
Diffstat (limited to 'tests/stdlib/tstrformat.nim')
-rw-r--r-- | tests/stdlib/tstrformat.nim | 13 |
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 |