aboutsummaryrefslogtreecommitdiffstats
path: root/tools/SputnikConverter
diff options
context:
space:
mode:
Diffstat (limited to 'tools/SputnikConverter')
-rw-r--r--tools/SputnikConverter/ES5TestCase.cs24
-rw-r--r--tools/SputnikConverter/Program.cs21
-rw-r--r--tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exebin24064 -> 24064 bytes
-rw-r--r--tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdbbin50688 -> 52736 bytes
4 files changed, 5 insertions, 40 deletions
diff --git a/tools/SputnikConverter/ES5TestCase.cs b/tools/SputnikConverter/ES5TestCase.cs
index 56d43381b..4d1116a14 100644
--- a/tools/SputnikConverter/ES5TestCase.cs
+++ b/tools/SputnikConverter/ES5TestCase.cs
@@ -89,9 +89,8 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
if (script.IsNegative)
{
//Add details in stringbuilder.
- string folderPath = GetPartialPath(destFullPath, 3);
StringBuilder sb = new StringBuilder();
- //sb.Append("GlobalScopeTests[\"GlobalScope/" + script.pathFromRoot.Replace("\\", "/") + "\"]");
+ //sb.Append("GlobalScopeTests[script.pathFromRoot.Replace("\\", "/") + "\"]");
sb.Append("GlobalScopeTests[\"" + script.id + "\"]");
sb.Append("=");
string s = GetSerializedSputnikTestScript(new SputnikTestScript()
@@ -147,7 +146,7 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
}
/// <summary>
- /// Method to update the GlobalScope.js
+ /// Method to update the SputnikGlobalScope.js
/// </summary>
/// <param name="destination">Is the destination folder path</param>
public static void UpdateGlobals(string destination)
@@ -225,24 +224,5 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
string inputTemplatePath = ConfigurationManager.AppSettings[configSetting].ToString();
return (new StreamReader(inputTemplatePath)).ReadToEnd();
}
-
- private static string GetPartialPath(string fullPath, int levelsRequired)
- {
- string remainingString = fullPath;
- string[] partialPaths = new string[levelsRequired];
- string finalPath = "GlobalScope";
-
- for (int iterator = 0; iterator < levelsRequired; iterator++)
- {
- partialPaths[iterator] = remainingString.Substring(remainingString.LastIndexOf(@"\"));
- remainingString = remainingString.Substring(0, remainingString.LastIndexOf(@"\"));
- }
-
- for (int iterator = partialPaths.Length - 1; iterator >= 0; iterator--)
- {
- finalPath += partialPaths[iterator];
- }
- return finalPath;
- }
}
}
diff --git a/tools/SputnikConverter/Program.cs b/tools/SputnikConverter/Program.cs
index dc8534411..e298f5353 100644
--- a/tools/SputnikConverter/Program.cs
+++ b/tools/SputnikConverter/Program.cs
@@ -12,7 +12,6 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
{
string source = string.Empty;
string destination = string.Empty;
- string globalScopeDestination = string.Empty;
if (args == null || args.Length < 2)
{
@@ -20,13 +19,6 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
}
source = args[0];
destination = args[1];
- if (!Directory.Exists(destination))
- {
- Directory.CreateDirectory(destination);
- }
-
-
- globalScopeDestination = destination.Remove(destination.LastIndexOf("\\") + 1) + "GlobalScope";
string root = "conformance";
@@ -37,24 +29,17 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
if (Directory.Exists(source))
{
string[] filePaths = Directory.GetFiles(source, "*.js", SearchOption.AllDirectories);
- ES5TestScript.InitGlobals(globalScopeDestination);
+ ES5TestScript.InitGlobals(destination);
foreach (string filePath in filePaths)
{
SputnikTestScript testScript = new SputnikTestScript();
testScript.Load(filePath, root);
- if (testScript.IsNegative)
- {
- ES5TestScript.Save(testScript, root, globalScopeDestination);
- }
- else
- {
- ES5TestScript.Save(testScript, root, destination);
- }
+ ES5TestScript.Save(testScript, root, destination);
countInputFiles++;
}
- ES5TestScript.UpdateGlobals(globalScopeDestination);
+ ES5TestScript.UpdateGlobals(destination);
}
Logger.WriteToLog(ResourceClass.Total_Input_Files, countInputFiles.ToString());
Logger.WriteToLog(ResourceClass.Total_Output_Files, ES5TestScript.OutputFileCounter.ToString());
diff --git a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe
index 6e020c31f..cf1ac1444 100644
--- a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe
+++ b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe
Binary files differ
diff --git a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb
index b4ced4221..a1b1a7266 100644
--- a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb
+++ b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb
Binary files differ