From 624bd847fb2dfdeca00548947ba248a7b32d2e03 Mon Sep 17 00:00:00 2001 From: Oscar NihlgÄrd Date: Tue, 9 Jan 2018 00:33:39 +0100 Subject: Add test case --- tests/stdlib/tstrformat.nim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/stdlib/tstrformat.nim (limited to 'tests/stdlib/tstrformat.nim') 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 -- cgit 1.4.1-2-gfad0