Initial implementation: format(TimeInterval, fmt)

This commit is contained in:
Jonathan Bernard
2016-10-07 21:55:33 -05:00
parent c503efe439
commit 4a8f0db62d
5 changed files with 31 additions and 0 deletions

6
test/nim.cfg Normal file
View File

@ -0,0 +1,6 @@
path = "."
hints = off
linedir = off
debuginfo
stacktrace = on
linetrace = on

8
test/ttimeutils.nim Normal file
View File

@ -0,0 +1,8 @@
import times, timeutils, unittest
suite "timeutils":
test "format TimeInterval":
let interval = seconds(70)
check interval.format("ss's'") == "10s"
check interval.format("mm'm' ss's'") == "01m 10s"
check interval.format("mm:ss") == "01:10"