Fixed some unit-testing stuff

This commit is contained in:
nikse.dk 2014-02-06 21:04:44 +01:00
parent 0ba616fa59
commit 0635adb4d4
2 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
/src/obj
/src/Test/bin
/src/Test/obj
/src/TestResults/*
/src/UpdateAssemblyInfo/bin
/src/UpdateAssemblyInfo/obj
/src/Properties/AssemblyInfo.cs

View File

@ -203,8 +203,17 @@ namespace Nikse.SubtitleEdit.Logic
Instance._baseDir = Path.GetDirectoryName(a.Location);
else
Instance._baseDir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
if (Instance._baseDir.StartsWith("C:\\SubtitleEdit\\Trunk\\src\\TestResults\\"))
Instance._baseDir = @"C:\SubtitleEdit\Trunk\src\bin\Release";
// C:\Data\subtitleedit\subtitleedit\src\TestResults
string tag = @"\SubtitleEdit\src\TestResults\";
int start = Instance._baseDir.ToLower().IndexOf(tag.ToLower());
if (start > 0)
{
string s = Instance._baseDir.Substring(0, start + tag.Length - 12) + "bin\\Release";
Instance._baseDir = s;
}
if (Instance._baseDir.EndsWith("Test\\bin\\Release"))
Instance._baseDir = Instance._baseDir.Replace("Test\\bin\\Release", "bin\\Release");
if (!Instance._baseDir.EndsWith(Path.DirectorySeparatorChar.ToString()))