mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Allow the list hack from issue 1863 to compile, however its behavior is
different than in SL. See http://opensimulator.org/mantis/view.php?id=1863 for details.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1557,6 +1557,31 @@ default
|
||||
Assert.AreEqual(expected, output);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLSLListHack()
|
||||
{
|
||||
string input = @"default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
list l = [""hello""];
|
||||
l = (l=[]) + l + ""world"";
|
||||
}
|
||||
}";
|
||||
|
||||
string expected = @"
|
||||
public void default_event_state_entry()
|
||||
{
|
||||
LSL_Types.list l = new LSL_Types.list(""hello"");
|
||||
l = (l = new LSL_Types.list()) + l + ""world"";
|
||||
}
|
||||
";
|
||||
|
||||
CSCodeGenerator cg = new CSCodeGenerator();
|
||||
string output = cg.Convert(input);
|
||||
Assert.AreEqual(expected, output);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException("Tools.CSToolsException")]
|
||||
public void TestSyntaxError()
|
||||
|
||||
Reference in New Issue
Block a user