Skip to content

Commit

Permalink
Trim version
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed Jun 8, 2020
1 parent 1fbf4a3 commit 501939e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/vstest.console.UnitTests/ExecutorUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests
using Utilities;

using CommandLineResources = Microsoft.VisualStudio.TestPlatform.CommandLine.Resources.Resources;
using System;

[TestClass]
public class ExecutorUnitTests
Expand Down Expand Up @@ -51,10 +52,13 @@ public void ExecutorPrintsSplashScreenTest()

// Just check first 20 characters - don't need to check whole thing as assembly version is variable
// "First Printed message must be Microsoft Copyright");
StringAssert.Contains(mockOutput.Messages.First()
.Message, CommandLineResources.MicrosoftCommandLineTitle.Substring(0, 20));

Assert.IsTrue(mockOutput.Messages.First().Message.EndsWith(assemblyVersion));
StringAssert.Contains(mockOutput.Messages.First().Message,
CommandLineResources.MicrosoftCommandLineTitle.Substring(0, 20));

var suffixIndex = assemblyVersion.IndexOf("-");
var version = suffixIndex == -1 ? assemblyVersion : assemblyVersion.Substring(0, suffixIndex);
StringAssert.Contains(mockOutput.Messages.First().Message,
version);
}

[TestMethod]
Expand Down

0 comments on commit 501939e

Please sign in to comment.