(t *testing.T)
| 90 | } |
| 91 | |
| 92 | func TestMapProcess_InheritGlobal_MissingRequired(t *testing.T) { |
| 93 | cfg := Node{ |
| 94 | Children: []Node{}, |
| 95 | } |
| 96 | |
| 97 | m := NewMap(map[string]interface{}{}, cfg) |
| 98 | |
| 99 | foo := "" |
| 100 | m.Custom("foo", false, true, nil, func(_ *Map, n Node) (interface{}, error) { |
| 101 | return n.Args[0], nil |
| 102 | }, &foo) |
| 103 | |
| 104 | _, err := m.Process() |
| 105 | if err == nil { |
| 106 | t.Errorf("Expected failure") |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | func TestMapProcess_InheritGlobal_Override(t *testing.T) { |
| 111 | cfg := Node{ |