From 65982c6dec5cac918a601000591acfaf43c551c3 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Thu, 24 Oct 2019 00:47:56 +0200 Subject: [PATCH] Fix filename bug in TestRunner when comparing multi-image files --- Il2CppTests/TestRunner.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Il2CppTests/TestRunner.cs b/Il2CppTests/TestRunner.cs index 2abe31c..3d10153 100644 --- a/Il2CppTests/TestRunner.cs +++ b/Il2CppTests/TestRunner.cs @@ -1,8 +1,12 @@ -using System; +/* + Copyright 2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com + + All rights reserved. +*/ + +using System; using System.IO; using System.Linq; -using System.Net.Sockets; -using System.Text.RegularExpressions; using NUnit.Framework; namespace Il2CppInspector @@ -39,8 +43,8 @@ namespace Il2CppInspector // Compare test result with expected result for (i = 0; i < inspectors.Count; i++) { - var expected = File.ReadAllLines(testPath + @"\..\..\TestExpectedResults\" + Path.GetFileName(testPath) + (i > 0 ? "-" + (i - 1) : "") + ".cs"); - var actual = File.ReadAllLines(testPath + @"\test-result" + (i > 0 ? "-" + (i - 1) : "") + ".cs"); + var expected = File.ReadAllLines(testPath + @"\..\..\TestExpectedResults\" + Path.GetFileName(testPath) + (i > 0 ? "-" + i : "") + ".cs"); + var actual = File.ReadAllLines(testPath + @"\test-result" + (i > 0 ? "-" + i : "") + ".cs"); // Get rid of blank lines and trim the remaining lines expected = (from l in expected where !string.IsNullOrWhiteSpace(l) select l.Trim()).ToArray();