Check content when cmd failed

Signed-off-by: Tang Le <at28997146@163.com>
This commit is contained in:
Tang Le 2017-02-20 10:34:05 +08:00
parent e26efd0b08
commit c0f0cb2ff7
3 changed files with 16 additions and 19 deletions

View file

@ -132,7 +132,7 @@ func TestTemplateWithData(t *testing.T) {
t.Errorf("invalid NGINX template: %v", err)
}
_, err = ngxTpl.Write(dat, func(b []byte) error { return nil })
_, err = ngxTpl.Write(dat)
if err != nil {
t.Errorf("invalid NGINX template: %v", err)
}
@ -166,6 +166,6 @@ func BenchmarkTemplateWithData(b *testing.B) {
}
for i := 0; i < b.N; i++ {
ngxTpl.Write(dat, func(b []byte) error { return nil })
ngxTpl.Write(dat)
}
}