From: Scott Lawrence Date: Wed, 4 Aug 2010 03:33:24 +0000 (+1000) Subject: bytes: added test case for explode with blank string. X-Git-Tag: weekly.2010-08-04~11 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=99aab8bacb71f6c232bb6b5a2cea4efb0c3e8018;p=gostls13.git 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 --- diff --git a/src/pkg/bytes/bytes_test.go b/src/pkg/bytes/bytes_test.go index 5d3e9f66a1..b91ae5734d 100644 --- a/src/pkg/bytes/bytes_test.go +++ b/src/pkg/bytes/bytes_test.go @@ -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"}},