func expect(t *testing.T, f memfile.File, s string) { f.Seek(0, 0) b, _ := ioutil.ReadAll(f) if string(b) != s { t.Errorf("'%v'!='%v'", string(b), s) t.FailNow() } }