diff --git a/Adaptation/.vscode/settings.json b/Adaptation/.vscode/settings.json index 4aafc48..cf354c7 100644 --- a/Adaptation/.vscode/settings.json +++ b/Adaptation/.vscode/settings.json @@ -38,7 +38,8 @@ "titleBar.activeBackground": "#7e669d", "titleBar.activeForeground": "#e7e7e7", "titleBar.inactiveBackground": "#7e669d99", - "titleBar.inactiveForeground": "#e7e7e799" + "titleBar.inactiveForeground": "#e7e7e799", + "commandCenter.border": "#e7e7e799" }, "peacock.color": "#7e669d", "cSpell.enabled": false diff --git a/Adaptation/FileHandlers/txt/ProcessData.cs b/Adaptation/FileHandlers/txt/ProcessData.cs index f4cb91a..0d08503 100644 --- a/Adaptation/FileHandlers/txt/ProcessData.cs +++ b/Adaptation/FileHandlers/txt/ProcessData.cs @@ -269,7 +269,7 @@ public class ProcessData : IProcessData else { // Remove illegal characters \/:*?"<>| found in the run. - title = Regex.Replace(text.Trim(), @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; if (title.StartsWith("1T") || title.StartsWith("1t")) title = title.Substring(2); run = title; @@ -343,6 +343,10 @@ public class ProcessData : IProcessData ScanPast("DEVICE:"); recipe = GetBefore("RESISTIVITY SPEC:"); } + title = title.Trim(); + if (title[0] != '[' && title[title.Length - 1] != ']') + throw new Exception("Lot summary data is invalid or missing."); + title = title.Substring(1, title.Length - 2); Descriptor descriptor = GetDescriptor(title); psn = descriptor.PSN; rds = descriptor.RDS; diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs index dc062a1..7e7c8cc 100644 --- a/Adaptation/_Tests/Shared/AdaptationTesting.cs +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -1250,12 +1250,13 @@ public class AdaptationTesting : ISMTP if (!fileRead.IsDuplicator) { Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); - Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); + Assert.IsNotNull(extractResult.Item3); Assert.IsNotNull(extractResult.Item4); if (!validatePDSF) _ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty(), Array.Empty())); else { + Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); Tuple pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]); Tuple pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); CompareSave(variables[5], pdsf, pdsfNew);