diff options
author | Jake Leahy <jake@leahy.dev> | 2023-02-21 22:04:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 12:04:27 +0100 |
commit | 6d423f1856d086ea9e6b0995e3e5f831f4f89aa6 (patch) | |
tree | 777184bd2cd93e16efb03124fde73aed8ab19efb /tests/stdlib/t21406.nim | |
parent | e54d3cc418f9eab750563aa771070374d559fe57 (diff) | |
download | Nim-6d423f1856d086ea9e6b0995e3e5f831f4f89aa6.tar.gz |
Make `Time` work with `std/strformat` (#21409)
* Add test case * Remove formatValue template for `Time` It didn't handle empty specifier correctly which caused it to be blank with strformat
Diffstat (limited to 'tests/stdlib/t21406.nim')
-rw-r--r-- | tests/stdlib/t21406.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stdlib/t21406.nim b/tests/stdlib/t21406.nim new file mode 100644 index 000000000..5b96227ce --- /dev/null +++ b/tests/stdlib/t21406.nim @@ -0,0 +1,5 @@ +import std/[times, strformat] +import std/assertions + +doAssert fmt"{getTime()}" == $getTime() +doAssert fmt"{now()}" == $now() |