1
0
mirror of https://github.com/golang/go synced 2024-11-21 19:04:44 -07:00

bytes: added test case for explode with blank string.

Tests for the equivalent of the strings.explode("") panic bug (issue 980).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1850052
This commit is contained in:
Scott Lawrence 2010-08-04 13:33:24 +10:00 committed by Rob Pike
parent 2db4c3d779
commit 99aab8bacb

View File

@ -212,6 +212,7 @@ type ExplodeTest struct {
}
var explodetests = []ExplodeTest{
ExplodeTest{"", -1, []string{}},
ExplodeTest{abcd, -1, []string{"a", "b", "c", "d"}},
ExplodeTest{faces, -1, []string{"☺", "☻", "☹"}},
ExplodeTest{abcd, 2, []string{"a", "bcd"}},