aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/text/template/exec_test.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-03-04 08:06:26 +1100
committerRob Pike <r@golang.org>2012-03-04 08:06:26 +1100
commit227a04d771c98f858663b56bd1bc10640097751d (patch)
tree776e70dece6e209fb088801a67236b2784be3074 /src/pkg/text/template/exec_test.go
parentf1d3ff1660f227154d05297654dc58c052711c34 (diff)
downloadgo-227a04d771c98f858663b56bd1bc10640097751d.tar.xz
text/template: one more test case
Missed a case for variadic functions with too few arguments. The code passes, and with the right error, but might as well record the test case. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5732050
Diffstat (limited to 'src/pkg/text/template/exec_test.go')
-rw-r--r--src/pkg/text/template/exec_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/text/template/exec_test.go b/src/pkg/text/template/exec_test.go
index 83ca0022ba..70ab39cad2 100644
--- a/src/pkg/text/template/exec_test.go
+++ b/src/pkg/text/template/exec_test.go
@@ -318,7 +318,8 @@ var execTests = []execTest{
{".BinaryFuncBad0", "{{call .BinaryFunc 1 3}}", "", tVal, false},
{".BinaryFuncBad1", "{{call .BinaryFunc `1` 3}}", "", tVal, false},
{".VariadicFuncBad0", "{{call .VariadicFunc 3}}", "", tVal, false},
- {".VariadicFuncIntBad0", "{{call .VariadicFuncInt `x`}}", "", tVal, false},
+ {".VariadicFuncIntBad0", "{{call .VariadicFuncInt}}", "", tVal, false},
+ {".VariadicFuncIntBad`", "{{call .VariadicFuncInt `x`}}", "", tVal, false},
// Pipelines.
{"pipeline", "-{{.Method0 | .Method2 .U16}}-", "-Method2: 16 M0-", tVal, true},