diff options
author | Mike Mazur | 2009-02-25 05:37:57 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-25 05:37:57 +0000 |
commit | 64c14d247569ddc51ef9401d2f1cf2620fb28b53 (patch) | |
tree | 9692fb5c2e3dac398e85ad43bea91f80be23a209 /OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs | |
parent | Fixes Mantis #3220. Thank you kindly, MPallari, for a patch that: (diff) | |
download | opensim-SC-64c14d247569ddc51ef9401d2f1cf2620fb28b53.zip opensim-SC-64c14d247569ddc51ef9401d2f1cf2620fb28b53.tar.gz opensim-SC-64c14d247569ddc51ef9401d2f1cf2620fb28b53.tar.bz2 opensim-SC-64c14d247569ddc51ef9401d2f1cf2620fb28b53.tar.xz |
Allow /* C-style comments */ in LSL scripts.
This fixes Mantis #3199. opensim-libs SVN r87 contains the corresponding
changes.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs index 02108c7..e00acc9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs | |||
@@ -369,6 +369,35 @@ default | |||
369 | } | 369 | } |
370 | 370 | ||
371 | [Test] | 371 | [Test] |
372 | public void TestCStyleComments() | ||
373 | { | ||
374 | string input = @"/* this test tests comments | ||
375 | of the C variety | ||
376 | */ | ||
377 | default | ||
378 | { | ||
379 | touch_start(integer num_detected) /* this should be stripped */ | ||
380 | { | ||
381 | /* | ||
382 | * fill | ||
383 | * in | ||
384 | * code | ||
385 | * here... | ||
386 | */ | ||
387 | } | ||
388 | } | ||
389 | "; | ||
390 | string expected = | ||
391 | "\n public void default_event_touch_start(LSL_Types.LSLInteger num_detected)" + | ||
392 | "\n {" + | ||
393 | "\n }\n"; | ||
394 | |||
395 | CSCodeGenerator cg = new CSCodeGenerator(); | ||
396 | string output = cg.Convert(input); | ||
397 | Assert.AreEqual(expected, output); | ||
398 | } | ||
399 | |||
400 | [Test] | ||
372 | public void TestGlobalDefinedFunctions() | 401 | public void TestGlobalDefinedFunctions() |
373 | { | 402 | { |
374 | string input = @"// this test tests custom defined functions | 403 | string input = @"// this test tests custom defined functions |