1
0
mirror of https://github.com/golang/go synced 2024-11-12 02:40:21 -07:00

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
This commit is contained in:
Rob Pike 2012-03-04 08:06:26 +11:00
parent f1d3ff1660
commit 227a04d771

View File

@ -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},