aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r--OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs
index 19c08ed..427390b 100644
--- a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs
+++ b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs
@@ -1558,6 +1558,31 @@ default
1558 } 1558 }
1559 1559
1560 [Test] 1560 [Test]
1561 public void TestLSLListHack()
1562 {
1563 string input = @"default
1564{
1565 state_entry()
1566 {
1567 list l = [""hello""];
1568 l = (l=[]) + l + ""world"";
1569 }
1570}";
1571
1572 string expected = @"
1573 public void default_event_state_entry()
1574 {
1575 LSL_Types.list l = new LSL_Types.list(""hello"");
1576 l = (l = new LSL_Types.list()) + l + ""world"";
1577 }
1578";
1579
1580 CSCodeGenerator cg = new CSCodeGenerator();
1581 string output = cg.Convert(input);
1582 Assert.AreEqual(expected, output);
1583 }
1584
1585 [Test]
1561 [ExpectedException("Tools.CSToolsException")] 1586 [ExpectedException("Tools.CSToolsException")]
1562 public void TestSyntaxError() 1587 public void TestSyntaxError()
1563 { 1588 {