aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
index 4420915..bc3b790 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
@@ -108,5 +108,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
108 Assert.That(grp1.Parts.Length, Is.EqualTo(4)); 108 Assert.That(grp1.Parts.Length, Is.EqualTo(4));
109 Assert.That(grp2.IsDeleted, Is.True); 109 Assert.That(grp2.IsDeleted, Is.True);
110 } 110 }
111
112 [Test]
113 public void TestllBreakLink()
114 {
115 TestHelpers.InMethod();
116
117 UUID ownerId = TestHelpers.ParseTail(0x1);
118
119 SceneObjectGroup grp1 = SceneHelpers.CreateSceneObject(2, ownerId, "grp1-", 0x10);
120 grp1.AbsolutePosition = new Vector3(10, 10, 10);
121 m_scene.AddSceneObject(grp1);
122
123 // FIXME: This should really be a script item (with accompanying script)
124 TaskInventoryItem grp1Item
125 = TaskInventoryHelpers.AddNotecard(m_scene, grp1.RootPart);
126 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
127
128 LSL_Api apiGrp1 = new LSL_Api();
129 apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item);
130
131 apiGrp1.llBreakLink(2);
132
133 Assert.That(grp1.Parts.Length, Is.EqualTo(1));
134
135 SceneObjectGroup grp2 = m_scene.GetSceneObjectGroup("grp1-Part1");
136 Assert.That(grp2, Is.Not.Null);
137 }
111 } 138 }
112} \ No newline at end of file 139} \ No newline at end of file