(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestFuncMap(t *testing.T) { |
| 77 | fns := funcMap() |
| 78 | forbidden := []string{"env", "expandenv"} |
| 79 | for _, f := range forbidden { |
| 80 | if _, ok := fns[f]; ok { |
| 81 | t.Errorf("Forbidden function %s exists in FuncMap.", f) |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // Test for Engine-specific template functions. |
| 86 | expect := []string{"include", "required", "tpl", "toYaml", "fromYaml", "toToml", "fromToml", "toJson", "fromJson", "lookup"} |
| 87 | for _, f := range expect { |
| 88 | if _, ok := fns[f]; !ok { |
| 89 | t.Errorf("Expected add-on function %q", f) |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | func TestRender(t *testing.T) { |
| 95 | modTime := time.Now() |
nothing calls this directly
no test coverage detected
searching dependent graphs…