mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
tpl/strings: Adjust the overflow validation in strings.Repeat
This now matches the validation in the stdlib, but we return an error instead.
This commit is contained in:
@@ -730,7 +730,7 @@ func TestRepeat(t *testing.T) {
|
||||
// errors
|
||||
{"", tstNoStringer{}, false},
|
||||
{tstNoStringer{}, "", false},
|
||||
{"hi", math.MaxInt16 + 1, false},
|
||||
{"ab", math.MaxInt64, false},
|
||||
} {
|
||||
errMsg := fmt.Sprintf("[%d] %v", i, test)
|
||||
|
||||
|
Reference in New Issue
Block a user