diff --git a/src/pkg/exp/template/html/escape_test.go b/src/pkg/exp/template/html/escape_test.go index a4ea7596cd1..1b3b2567335 100644 --- a/src/pkg/exp/template/html/escape_test.go +++ b/src/pkg/exp/template/html/escape_test.go @@ -1549,8 +1549,8 @@ func TestEnsurePipelineContains(t *testing.T) { } } -func expectExecuteFailure(t *testing.T, b *bytes.Buffer) { - if x := recover(); x != nil { +func expectExecuteFailure(t *testing.T, b *bytes.Buffer, err os.Error) { + if err != nil { if b.Len() != 0 { t.Errorf("output on buffer: %q", b.String()) } @@ -1563,8 +1563,8 @@ func TestEscapeErrorsNotIgnorable(t *testing.T) { var b bytes.Buffer tmpl := template.Must(template.New("dangerous").Parse("