Add test case
This commit is contained in:
parent
cde3a4f586
commit
624bd847fb
1 changed files with 13 additions and 0 deletions
13
tests/stdlib/tstrformat.nim
Normal file
13
tests/stdlib/tstrformat.nim
Normal file
|
|
@ -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 "
|
||||||
Loading…
Add table
Add a link
Reference in a new issue