aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
index ac9f93b..4c5a501 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
@@ -141,5 +141,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
141 SceneObjectGroup grp2 = m_scene.GetSceneObjectGroup("grp1-Part1"); 141 SceneObjectGroup grp2 = m_scene.GetSceneObjectGroup("grp1-Part1");
142 Assert.That(grp2, Is.Not.Null); 142 Assert.That(grp2, Is.Not.Null);
143 } 143 }
144
145 [Test]
146 public void TestllBreakAllLinks()
147 {
148 TestHelpers.InMethod();
149
150 UUID ownerId = TestHelpers.ParseTail(0x1);
151
152 SceneObjectGroup grp1 = SceneHelpers.CreateSceneObject(3, ownerId, "grp1-", 0x10);
153 grp1.AbsolutePosition = new Vector3(10, 10, 10);
154 m_scene.AddSceneObject(grp1);
155
156 // FIXME: This should really be a script item (with accompanying script)
157 TaskInventoryItem grp1Item
158 = TaskInventoryHelpers.AddNotecard(
159 m_scene, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
160
161 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
162
163 LSL_Api apiGrp1 = new LSL_Api();
164 apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null);
165
166 apiGrp1.llBreakAllLinks();
167
168 {
169 SceneObjectGroup nowGrp = m_scene.GetSceneObjectGroup("grp1-Part1");
170 Assert.That(nowGrp, Is.Not.Null);
171 Assert.That(nowGrp.Parts.Length, Is.EqualTo(1));
172 }
173
174 {
175 SceneObjectGroup nowGrp = m_scene.GetSceneObjectGroup("grp1-Part2");
176 Assert.That(nowGrp, Is.Not.Null);
177 Assert.That(nowGrp.Parts.Length, Is.EqualTo(1));
178 }
179
180 {
181 SceneObjectGroup nowGrp = m_scene.GetSceneObjectGroup("grp1-Part3");
182 Assert.That(nowGrp, Is.Not.Null);
183 Assert.That(nowGrp.Parts.Length, Is.EqualTo(1));
184 }
185 }
144 } 186 }
145} \ No newline at end of file 187} \ No newline at end of file