~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/net/http/response_test.go

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý, Ondřej Surý, Michael Stapelberg
  • Date: 2012-06-28 12:14:15 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120628121415-w1b0076ixkarr1ml
[ Ondřej Surý ]
* Imported Upstream version 1.0.2
* Update Vcs fields to reflect new git repository location
* Kill get-orig-source, since 1.0.0, the tarballs can be downloaded
  from webpage

[ Michael Stapelberg ]
* golang-mode: use debian-pkg-add-load-path-item (Closes: #664802)
* Add manpages (Closes: #632964)
* Use updated pt.po from Pedro Ribeiro (Closes: #674958)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
        "io/ioutil"
15
15
        "net/url"
16
16
        "reflect"
 
17
        "strings"
17
18
        "testing"
18
19
)
19
20
 
444
445
                }
445
446
        }
446
447
}
 
448
 
 
449
func TestResponseStatusStutter(t *testing.T) {
 
450
        r := &Response{
 
451
                Status:     "123 some status",
 
452
                StatusCode: 123,
 
453
                ProtoMajor: 1,
 
454
                ProtoMinor: 3,
 
455
        }
 
456
        var buf bytes.Buffer
 
457
        r.Write(&buf)
 
458
        if strings.Contains(buf.String(), "123 123") {
 
459
                t.Errorf("stutter in status: %s", buf.String())
 
460
        }
 
461
}