(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestMapProcess_MissingRequired(t *testing.T) { |
| 53 | cfg := Node{ |
| 54 | Children: []Node{}, |
| 55 | } |
| 56 | |
| 57 | m := NewMap(nil, cfg) |
| 58 | |
| 59 | foo := "" |
| 60 | m.Custom("foo", false, true, nil, func(_ *Map, n Node) (interface{}, error) { |
| 61 | return n.Args[0], nil |
| 62 | }, &foo) |
| 63 | |
| 64 | _, err := m.Process() |
| 65 | if err == nil { |
| 66 | t.Errorf("Expected failure") |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | func TestMapProcess_InheritGlobal(t *testing.T) { |
| 71 | cfg := Node{ |