diff options
| author | Rob Pike <r@golang.org> | 2011-12-20 10:36:25 -0800 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2011-12-20 10:36:25 -0800 |
| commit | 6b772462e420d15f5e1669a5f03e4f1cb7d8f2af (patch) | |
| tree | 6c54dc3455a36f21f5d12f9d3e8ea170cb7562db /src/pkg/html | |
| parent | b9697d4a58bfd6dd99e03123c3d53e4f1b035787 (diff) | |
| download | go-6b772462e420d15f5e1669a5f03e4f1cb7d8f2af.tar.xz | |
panics: use the new facilities of testing.B instead
Lots of panics go away.
Also fix a name error in html/template.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5498045
Diffstat (limited to 'src/pkg/html')
| -rw-r--r-- | src/pkg/html/template/error.go | 6 | ||||
| -rw-r--r-- | src/pkg/html/template/escape_test.go | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/html/template/error.go b/src/pkg/html/template/error.go index 9622d7e48e..dcac748967 100644 --- a/src/pkg/html/template/error.go +++ b/src/pkg/html/template/error.go @@ -183,11 +183,11 @@ const ( func (e *Error) Error() string { if e.Line != 0 { - return fmt.Sprintf("exp/template/html:%s:%d: %s", e.Name, e.Line, e.Description) + return fmt.Sprintf("html/template:%s:%d: %s", e.Name, e.Line, e.Description) } else if e.Name != "" { - return fmt.Sprintf("exp/template/html:%s: %s", e.Name, e.Description) + return fmt.Sprintf("html/template:%s: %s", e.Name, e.Description) } - return "exp/template/html: " + e.Description + return "html/template: " + e.Description } // errorf creates an error given a format string f and args. diff --git a/src/pkg/html/template/escape_test.go b/src/pkg/html/template/escape_test.go index 2d15c71844..7702300ffd 100644 --- a/src/pkg/html/template/escape_test.go +++ b/src/pkg/html/template/escape_test.go @@ -944,23 +944,23 @@ func TestErrors(t *testing.T) { }, { `<input type=button value=onclick=>`, - `exp/template/html:z: "=" in unquoted attr: "onclick="`, + `html/template:z: "=" in unquoted attr: "onclick="`, }, { `<input type=button value= onclick=>`, - `exp/template/html:z: "=" in unquoted attr: "onclick="`, + `html/template:z: "=" in unquoted attr: "onclick="`, }, { `<input type=button value= 1+1=2>`, - `exp/template/html:z: "=" in unquoted attr: "1+1=2"`, + `html/template:z: "=" in unquoted attr: "1+1=2"`, }, { "<a class=`foo>", - "exp/template/html:z: \"`\" in unquoted attr: \"`foo\"", + "html/template:z: \"`\" in unquoted attr: \"`foo\"", }, { `<a style=font:'Arial'>`, - `exp/template/html:z: "'" in unquoted attr: "font:'Arial'"`, + `html/template:z: "'" in unquoted attr: "font:'Arial'"`, }, { `<a=foo>`, |
