From ec13642e1a1eb3ee3348fabc9c3de054b627a920 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Sun, 7 Sep 2008 08:00:41 +0000 Subject: Convert TestStringsWithEscapedQuotesAndComments to use concatenated expected string. --- .../Shared/CodeTools/CSCodeGeneratorTest.cs | 29 +++++++--------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Tests/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs b/OpenSim/Tests/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs index 7522f39..4417819 100644 --- a/OpenSim/Tests/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs +++ b/OpenSim/Tests/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs @@ -349,26 +349,15 @@ default } "; - string expected = @" - public void default_event_touch_start(LSL_Types.LSLInteger num_detected) - { - LSL_Types.LSLString s1 = new LSL_Types.LSLString(""this is a string.""); - LSL_Types.LSLString s2 = new LSL_Types.LSLString(""this is a string "") + new LSL_Types.LSLString(""with an escaped \"" inside it.""); - s1 = s2 + new LSL_Types.LSLString("" and this "") + new LSL_Types.LSLString(""is a string with // comments.""); - LSL_Types.LSLString onemore = new LSL_Types.LSLString(""[\^@]""); - LSL_Types.LSLString multiline = new LSL_Types.LSLString(""Good evening Sir,\n my name is Steve.\n I come from a rough area.\n I used to be addicted to crack\n but now I am off it and trying to stay clean.\n That is why I am selling magazine subscriptions.""); - } -"; - - //string expected = - // "\n public void default_event_touch_start(LSL_Types.LSLInteger num_detected)" + - // "\n {" + - // "\n LSL_Types.LSLString s1 = new LSL_Types.LSLString(\"this is a string.\");" + - // "\n LSL_Types.LSLString s2 = new LSL_Types.LSLString(\"this is a string \") + new LSL_Types.LSLString(\"with an escaped \\\" inside it.\");" + - // "\n s1 = s2 + new LSL_Types.LSLString(\" and this \") + new LSL_Types.LSLString(\"is a string with // comments.\");" + - // "\n LSL_Types.LSLString onemore = new LSL_Types.LSLString(\"[\\^@]\");" + - // "\n LSL_Types.LSLString multiline = new LSL_Types.LSLString(\"Good evening Sir,\n my name is Steve.\n I come from a rough area.\n I used to be addicted to crack\n but now I am off it and trying to stay clean.\n That is why I am selling magazine subscriptions.\");" + - // "\n }\n"; + string expected = + "\n public void default_event_touch_start(LSL_Types.LSLInteger num_detected)" + + "\n {" + + "\n LSL_Types.LSLString s1 = new LSL_Types.LSLString(\"this is a string.\");" + + "\n LSL_Types.LSLString s2 = new LSL_Types.LSLString(\"this is a string \") + new LSL_Types.LSLString(\"with an escaped \\\" inside it.\");" + + "\n s1 = s2 + new LSL_Types.LSLString(\" and this \") + new LSL_Types.LSLString(\"is a string with // comments.\");" + + "\n LSL_Types.LSLString onemore = new LSL_Types.LSLString(\"[\\^@]\");" + + "\n LSL_Types.LSLString multiline = new LSL_Types.LSLString(\"Good evening Sir,\\n my name is Steve.\\n I come from a rough area.\\n I used to be addicted to crack\\n but now I am off it and trying to stay clean.\\n That is why I am selling magazine subscriptions.\");" + + "\n }\n"; CSCodeGenerator cg = new CSCodeGenerator(); string output = cg.Convert(input); -- cgit v1.1