Add automated TestllBreakLink()
parent
5ed0559cf2
commit
f25efa291d
|
@ -108,5 +108,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
Assert.That(grp1.Parts.Length, Is.EqualTo(4));
|
Assert.That(grp1.Parts.Length, Is.EqualTo(4));
|
||||||
Assert.That(grp2.IsDeleted, Is.True);
|
Assert.That(grp2.IsDeleted, Is.True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestllBreakLink()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
|
||||||
|
UUID ownerId = TestHelpers.ParseTail(0x1);
|
||||||
|
|
||||||
|
SceneObjectGroup grp1 = SceneHelpers.CreateSceneObject(2, ownerId, "grp1-", 0x10);
|
||||||
|
grp1.AbsolutePosition = new Vector3(10, 10, 10);
|
||||||
|
m_scene.AddSceneObject(grp1);
|
||||||
|
|
||||||
|
// FIXME: This should really be a script item (with accompanying script)
|
||||||
|
TaskInventoryItem grp1Item
|
||||||
|
= TaskInventoryHelpers.AddNotecard(m_scene, grp1.RootPart);
|
||||||
|
grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
|
||||||
|
|
||||||
|
LSL_Api apiGrp1 = new LSL_Api();
|
||||||
|
apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item);
|
||||||
|
|
||||||
|
apiGrp1.llBreakLink(2);
|
||||||
|
|
||||||
|
Assert.That(grp1.Parts.Length, Is.EqualTo(1));
|
||||||
|
|
||||||
|
SceneObjectGroup grp2 = m_scene.GetSceneObjectGroup("grp1-Part1");
|
||||||
|
Assert.That(grp2, Is.Not.Null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue