add test
This commit is contained in:
parent
a44958a961
commit
71c70d9b72
2 changed files with 24 additions and 0 deletions
|
|
@ -574,6 +574,7 @@ func (obj *Object) newObject(id string) *Object {
|
|||
|
||||
func (obj *Object) HasChild(ids []string) (*Object, bool) {
|
||||
if len(ids) == 0 {
|
||||
println("\033[1;31m--- DEBUG:", "=======================", "\033[m")
|
||||
return obj, true
|
||||
}
|
||||
if len(ids) == 1 && ids[0] != "style" {
|
||||
|
|
|
|||
|
|
@ -3526,6 +3526,29 @@ func TestDelete(t *testing.T) {
|
|||
key: `x`,
|
||||
|
||||
exp: `x.y.z -> y.b
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "duplicate_generated",
|
||||
|
||||
text: `x
|
||||
x 2
|
||||
x 3: {
|
||||
x 3
|
||||
x 4
|
||||
}
|
||||
x 4
|
||||
y
|
||||
`,
|
||||
key: `x 3`,
|
||||
exp: `x
|
||||
x 2
|
||||
|
||||
x 3
|
||||
x 5
|
||||
|
||||
x 4
|
||||
y
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue