mirror of
https://github.com/tc39/test262.git
synced 2025-09-27 12:08:43 +02:00
were actually unique across the test cases. This *was* needed prior to November as we weren't running each test case in it's own private global environment. The situation now is that we're running each test within it's own iframe => the modifications are no longer needed. Few small improvements to SputnikConverter: - App.config file locations have been fixed - template files get pushed alongside generated tool binaries - the root path for Sputnik conformance files is "Conformance", not "tests" - allow the main exe to throw exceptions so they can be properly debugged with VS
58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
|
|
namespace Microsoft.Sputnik.Interop.ParserEngine
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
string source = string.Empty;
|
|
string destination = string.Empty;
|
|
|
|
if (args == null || args.Length < 2)
|
|
{
|
|
return;
|
|
}
|
|
source = args[0];
|
|
destination = args[1];
|
|
|
|
string root = "Conformance";
|
|
|
|
int countInputFiles = 0;
|
|
try
|
|
{
|
|
|
|
Logger.WriteToLog("Start Time : {0}", DateTime.Now.ToString());
|
|
if (Directory.Exists(source))
|
|
{
|
|
string[] filePaths = Directory.GetFiles(source, "*.js", SearchOption.AllDirectories);
|
|
|
|
foreach (string filePath in filePaths)
|
|
{
|
|
SputnikTestScript testScript = new SputnikTestScript();
|
|
testScript.Load(filePath);
|
|
ES5TestScript.Save(testScript, root, destination);
|
|
countInputFiles++;
|
|
}
|
|
}
|
|
Logger.WriteToLog(ResourceClass.Total_Input_Files, countInputFiles.ToString());
|
|
Logger.WriteToLog(ResourceClass.Total_Output_Files, ES5TestScript.OutputFileCounter.ToString());
|
|
Console.WriteLine(ResourceClass.Total_Input_Files, countInputFiles.ToString());
|
|
Console.WriteLine(ResourceClass.Total_Output_Files, ES5TestScript.OutputFileCounter.ToString());
|
|
Console.WriteLine(ResourceClass.PressExit);
|
|
Logger.WriteToLog("End Time : {0}", DateTime.Now.ToShortDateString());
|
|
Console.ReadLine();
|
|
}
|
|
finally
|
|
{
|
|
Logger.Dispose();
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|