Use %q to print test raw string.

This commit is contained in:
Chen Yufei
2013-02-20 18:28:12 +08:00
parent a787498442
commit 6ec156d434
2 changed files with 6 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ func TestSendBodyChunked(t *testing.T) {
sendBodyChunked(buf, r, &w)
if w.String() != td.raw {
t.Errorf("sendBodyChunked wrong, raw data is:\n%sgot:%s\n", td.raw, w.String())
t.Errorf("sendBodyChunked wrong, raw data is:\n%qgot:%q\n", td.raw, w.String())
}
}
}