From 6b51d2e906a54f92f3ed39cf9c9ede9b8d284e9d Mon Sep 17 00:00:00 2001 From: Vladimir Kuznetsov Date: Fri, 28 Feb 2020 04:53:09 +0000 Subject: [PATCH] Update fmt_test.go - add test with two-digits number index --- varfmt/fmt_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/varfmt/fmt_test.go b/varfmt/fmt_test.go index be1f324..661dcb5 100644 --- a/varfmt/fmt_test.go +++ b/varfmt/fmt_test.go @@ -44,6 +44,11 @@ func TestFormat(t *testing.T) { args: []interface{}{0, 1, "World"}, result: "Hello, World", }, + { + format: "{10}", + args: []interface{}{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + result: "10", + }, } { t.Run(tc.result, func(t *testing.T) { require.Equal(t, tc.result, Sprintf(tc.format, tc.args...))