aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-22 02:22:58 +0000
committerJustin Clark-Casey (justincc)2013-01-22 02:22:58 +0000
commit679dc811dda95bd3d037e9bd691a9cd10fbf032a (patch)
tree9ac18a43d8666db87ca941b9951b60cf3ad51499 /OpenSim/Region/ScriptEngine
parentAdd regression test for co-op stop of an infinite jump loop (diff)
downloadopensim-SC_OLD-679dc811dda95bd3d037e9bd691a9cd10fbf032a.zip
opensim-SC_OLD-679dc811dda95bd3d037e9bd691a9cd10fbf032a.tar.gz
opensim-SC_OLD-679dc811dda95bd3d037e9bd691a9cd10fbf032a.tar.bz2
opensim-SC_OLD-679dc811dda95bd3d037e9bd691a9cd10fbf032a.tar.xz
Add regression test for co-op termination on infinite user function call regression.
Such a script would probably run out of stack pretty quickly anyway.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
index 3365c92..149a27b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
@@ -261,6 +261,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
261 TestStop(script); 261 TestStop(script);
262 } 262 }
263 263
264 [Test]
265 public void TestStopOnInfiniteUserFunctionCallLoop()
266 {
267 TestHelpers.InMethod();
268// TestHelpers.EnableLogging();
269
270 string script =
271@"
272integer i = 0;
273
274ufn1()
275{
276 llSay(0, ""Iter ufn1() "" + (string)i++);
277 ufn1();
278}
279
280default
281{
282 state_entry()
283 {
284 integer i = 0;
285 llSay(0, ""Thin Lizzy"");
286
287 ufn1();
288 }
289}";
290
291 TestStop(script);
292 }
293
264 private void TestStop(string script) 294 private void TestStop(string script)
265 { 295 {
266 UUID userId = TestHelpers.ParseTail(0x1); 296 UUID userId = TestHelpers.ParseTail(0x1);