projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d2b6fc
)
tpl: Add missing test scenario for strings.Substr
author
Cameron Moore
<moorereason@gmail.com>
Sun, 3 Jan 2021 18:00:17 +0000
(12:00 -0600)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Fri, 8 Jan 2021 09:13:10 +0000
(10:13 +0100)
tpl/strings/strings_test.go
patch
|
blob
|
history
diff --git
a/tpl/strings/strings_test.go
b/tpl/strings/strings_test.go
index c09bfaf6709f3e3ea3206cd5cc88ac51c15daf0d..ef926aeef3354b6531f2097f36b4100f8a876697 100644
(file)
--- 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
}