From 99aab8bacb71f6c232bb6b5a2cea4efb0c3e8018 Mon Sep 17 00:00:00 2001 From: Scott Lawrence Date: Wed, 4 Aug 2010 13:33:24 +1000 Subject: [PATCH] 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 --- src/pkg/bytes/bytes_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/bytes/bytes_test.go b/src/pkg/bytes/bytes_test.go index 5d3e9f66a1e..b91ae5734d1 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"}},