public static int Run(List<string>/*!*/ args, string/*!*/ baseDirectory) {
if (Thread.CurrentThread.CurrentCulture.ToString() != "en-US") {
Console.WriteLine("Current culture: {0}", Thread.CurrentThread.CurrentCulture);
}
if (!ParseArguments(args)) {
return -3;
}
int status = 0;
if (_runTokenizerDriver) {
TokenizerTestDriver driver = new TokenizerTestDriver((RubyContext)HostingHelpers.GetLanguageContext(Ruby.CreateEngine()));
if (!driver.ParseArgs(args)) {
return -3;
}
status = driver.RunTests();
} else {
InitializeDomain();
Driver driver = new Driver(baseDirectory);
if (Manual.TestCode.Trim().Length == 0) {
status = driver.RunUnitTests(args);
} else {
driver.RunManualTest();
// for case the test is forgotten, this would fail the test suite:
status = -2;
}
}
// return failure on bad filter (any real failures throw)
return status;
}