diff options
author | Rob Pike <r@golang.org> | 2012-03-04 08:06:26 +1100 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2012-03-04 08:06:26 +1100 |
commit | f6907c72a8da163d8b0fe20086f2d145dd4a6835 (patch) | |
tree | f1ae2dac134351779502ff3b42ef4ae285a76951 | |
parent | 9bf96edfd3433b6447341574f515c4f0d37cadc4 (diff) | |
download | go-f6907c72a8da163d8b0fe20086f2d145dd4a6835.tar.gz |
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
http://codereview.appspot.com/5732050
-rw-r--r-- | src/pkg/text/template/exec_test.go | 3 |
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 83ca0022b..70ab39cad 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}, |