summaryrefslogtreecommitdiffstats
path: root/tpl/collections/apply_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/collections/apply_test.go')
-rw-r--r--tpl/collections/apply_test.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/tpl/collections/apply_test.go b/tpl/collections/apply_test.go
index 96dd8896b..5b21d5a97 100644
--- a/tpl/collections/apply_test.go
+++ b/tpl/collections/apply_test.go
@@ -14,6 +14,8 @@
package collections
import (
+ "io"
+ "reflect"
"testing"
"fmt"
@@ -33,10 +35,17 @@ func (templateFinder) LookupVariant(name string, variants tpl.TemplateVariants)
return nil, false, false
}
-func (templateFinder) GetFuncs() map[string]interface{} {
- return map[string]interface{}{
- "print": fmt.Sprint,
+func (templateFinder) Execute(t tpl.Template, wr io.Writer, data interface{}) error {
+ return nil
+}
+
+func (templateFinder) GetFunc(name string) (reflect.Value, bool) {
+ if name == "dobedobedo" {
+ return reflect.Value{}, false
}
+
+ return reflect.ValueOf(fmt.Sprint), true
+
}
func TestApply(t *testing.T) {