commit | bcccad40202ba895d237d9d0a921b33bc2c5601f | [log] [tgz] |
---|---|---|
author | Rob Pike <r@golang.org> | Sun Oct 07 09:26:59 2012 +1100 |
committer | Rob Pike <r@golang.org> | Sun Oct 07 09:26:59 2012 +1100 |
tree | 419f60094df08faa86a8952666d16accc2c0a576 | |
parent | 421b75c0dbab3460dbfdb023d67ce0807c4d5327 [diff] [blame] |
text/template: fix nil crash on Templates Fixes #3872. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6612060
diff --git a/src/pkg/text/template/exec_test.go b/src/pkg/text/template/exec_test.go index d793651..683e9ac 100644 --- a/src/pkg/text/template/exec_test.go +++ b/src/pkg/text/template/exec_test.go
@@ -811,3 +811,8 @@ t.Errorf("expected %q got %q", expect, result) } } + +func TestExecuteOnNewTemplate(t *testing.T) { + // This is issue 3872. + _ = New("Name").Templates() +}