| 48 | } |
| 49 | |
| 50 | func TestNodePath(t *testing.T) { |
| 51 | parent := testdata.NewNodeEmbed() |
| 52 | child1 := parent.NewChild(parent.NodeType()) |
| 53 | child2 := parent.NewChild(parent.NodeType()) |
| 54 | child3 := parent.NewChild(parent.NodeType()) |
| 55 | assert.Len(t, parent.Children, 3) |
| 56 | assert.Equal(t, "/node-embed/node-embed-0", child1.AsTree().Path()) |
| 57 | assert.Equal(t, "/node-embed/node-embed-1", child2.AsTree().Path()) |
| 58 | assert.Equal(t, "/node-embed/node-embed-2", child3.AsTree().Path()) |
| 59 | } |
| 60 | |
| 61 | func TestNodeEscapePaths(t *testing.T) { |
| 62 | parent := NewNodeBase() |