-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- RC v4.8.12.0 --- ## Changes ### CLI - added option to run scripts under .NET Framework (`css -netfx <script>`) - added option to run scripts as external process (`css -rx <script>`) - extended verbose mode output ### CSScriptLib - <no changes>
- Loading branch information
1 parent
fd3f7b0
commit a8e87ab
Showing
29 changed files
with
1,127 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using CSScripting; | ||
using Xunit; | ||
|
||
namespace CLI | ||
{ | ||
public class CliAlgorithms | ||
{ | ||
string ToCode(string staticMain) | ||
{ | ||
return @" | ||
using System; | ||
using System.Xml; | ||
using WixSharp; | ||
public class Script | ||
{ | ||
$staticMain$ | ||
{ | ||
} | ||
} | ||
".Replace("$staticMain$", staticMain); | ||
} | ||
|
||
[Fact] | ||
public void inject_asm_probing_in_void_main_with_args() | ||
{ | ||
var processedCode = CSSUtils.InjectModuleInitializer(ToCode( | ||
"static public void Main(string[] args)"), "HostingRuntime.Init();"); | ||
|
||
Assert.Contains("static void Main(string[] args) { HostingRuntime.Init(); impl_Main(args); } static public void impl_Main(string[] args)", | ||
processedCode); | ||
} | ||
|
||
[Fact] | ||
public void inject_asm_probing_in_nonvoid_main_with_args() | ||
{ | ||
var processedCode = CSSUtils.InjectModuleInitializer(ToCode( | ||
"static public int Main(string[] args)"), "HostingRuntime.Init();"); | ||
Assert.Contains("static int Main(string[] args) { HostingRuntime.Init(); return impl_Main(args); } static public int impl_Main(string[] args)", | ||
processedCode); | ||
} | ||
|
||
[Fact] | ||
public void inject_asm_probing_in_void_main_with_no_args() | ||
{ | ||
var processedCode = CSSUtils.InjectModuleInitializer(ToCode( | ||
"static public void Main()"), "HostingRuntime.Init();"); | ||
|
||
Assert.Contains("static void Main() { HostingRuntime.Init(); impl_Main(); } static public void impl_Main()", | ||
processedCode); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.