Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2021-01-03 21:00:17 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-01-08 12:13:10 +0300
commit788e50ad3a55609ed49ce0b7ee98965c181fe9cf (patch)
treeb1721dcc56a5f1fcda5df46e720086ffda27d86d /tpl
parent4d2b6fc4c0e714f3f1ed345d6d75ed1662948791 (diff)
tpl: Add missing test scenario for strings.Substr
Diffstat (limited to 'tpl')
-rw-r--r--tpl/strings/strings_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tpl/strings/strings_test.go b/tpl/strings/strings_test.go
index c09bfaf67..ef926aeef 100644
--- a/tpl/strings/strings_test.go
+++ b/tpl/strings/strings_test.go
@@ -453,6 +453,7 @@ func TestSubstr(t *testing.T) {
{"abcdef", 2, -1, "cde"},
{"abcdef", 4, -4, false},
{"abcdef", 7, 1, false},
+ {"abcdef", 6, nil, false},
{"abcdef", 1, 100, "bcdef"},
{"abcdef", -100, 3, "abc"},
{"abcdef", -3, -1, "de"},
@@ -486,7 +487,7 @@ func TestSubstr(t *testing.T) {
}
if b, ok := test.expect.(bool); ok && !b {
- c.Assert(err, qt.Not(qt.IsNil), qt.Commentf("%v", test))
+ c.Check(err, qt.Not(qt.IsNil), qt.Commentf("%v", test))
continue
}