(t *testing.T)
| 840 | } |
| 841 | |
| 842 | func TestRecursiveInclude(t *testing.T) { |
| 843 | l := NewInMemLoader() |
| 844 | l.Set("recursive_incl_1", `{{ include "./recursive_incl_2" }}`) |
| 845 | l.Set("recursive_incl_2", `{{ include "./recursive_incl_1" }}`) |
| 846 | var set = NewSet(l, WithSafeWriter(nil)) |
| 847 | tt, err := set.getTemplate("recursive_incl_1", true) |
| 848 | err = tt.Execute(io.Discard, nil, nil) |
| 849 | if err == nil { |
| 850 | t.Error("expected recursive include to fail with a runtime error, but got nil") |
| 851 | } |
| 852 | if !strings.Contains(err.Error(), "maximum 'include' depth") { |
| 853 | t.Errorf("expected runtime error to be about maximum include depth, but got %q", err.Error()) |
| 854 | } |
| 855 | } |
| 856 | |
| 857 | func BenchmarkSimpleAction(b *testing.B) { |
| 858 | t, _ := JetTestingSet.GetTemplate("actionNode_dummy") |
nothing calls this directly
no test coverage detected
searching dependent graphs…