File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
test/vstest.console.UnitTests Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests
21
21
using Utilities ;
22
22
23
23
using CommandLineResources = Microsoft . VisualStudio . TestPlatform . CommandLine . Resources . Resources ;
24
+ using System ;
24
25
25
26
[ TestClass ]
26
27
public class ExecutorUnitTests
@@ -51,10 +52,13 @@ public void ExecutorPrintsSplashScreenTest()
51
52
52
53
// Just check first 20 characters - don't need to check whole thing as assembly version is variable
53
54
// "First Printed message must be Microsoft Copyright");
54
- StringAssert . Contains ( mockOutput . Messages . First ( )
55
- . Message , CommandLineResources . MicrosoftCommandLineTitle . Substring ( 0 , 20 ) ) ;
56
-
57
- Assert . IsTrue ( mockOutput . Messages . First ( ) . Message . EndsWith ( assemblyVersion ) ) ;
55
+ StringAssert . Contains ( mockOutput . Messages . First ( ) . Message ,
56
+ CommandLineResources . MicrosoftCommandLineTitle . Substring ( 0 , 20 ) ) ;
57
+
58
+ var suffixIndex = assemblyVersion . IndexOf ( "-" ) ;
59
+ var version = suffixIndex == - 1 ? assemblyVersion : assemblyVersion . Substring ( 0 , suffixIndex ) ;
60
+ StringAssert . Contains ( mockOutput . Messages . First ( ) . Message ,
61
+ version ) ;
58
62
}
59
63
60
64
[ TestMethod ]
You can’t perform that action at this time.
0 commit comments