mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Add test case
This commit is contained in:
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 "
|
||||
Reference in New Issue
Block a user