]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/ascii85: add empty string case for Encode test
authorShawn Smith <shawn.p.smith@gmail.com>
Wed, 18 Dec 2013 16:33:59 +0000 (08:33 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 18 Dec 2013 16:33:59 +0000 (08:33 -0800)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/36830046

src/pkg/encoding/ascii85/ascii85_test.go

index 42cf7e80e1b3b5ccb57080122d2fd7da9d78219d..dc1134dccd63713c88633370e4361b306edd076a 100644 (file)
@@ -16,6 +16,11 @@ type testpair struct {
 }
 
 var pairs = []testpair{
+       // Encode returns 0 when len(src) is 0
+       {
+               "",
+               "",
+       },
        // Wikipedia example
        {
                "Man is distinguished, not only by his reason, but by this singular passion from " +