Skip to content

Commit 5e08dc3

Browse files
committed
Simplify version regex pattern
The current pattern is not working for all versions we release. Rather than doing a complex check, because we don't really care about the value, I am simply checking something is printed but disregard the format.
1 parent db27b1b commit 5e08dc3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task Help_WhenNoExtensionRegistered_OutputDefaultHelpContent(string
2727

2828
const string RegexMatchPattern = $"""
2929
Microsoft\(R\) Testing Platform Execution Command Line Tool
30-
Version: \d+\.\d+\.\d+(-.*)?
30+
Version: .+
3131
RuntimeInformation: .+
3232
Copyright\(c\) Microsoft Corporation\.  All rights reserved\.
3333
Usage {TestAssetFixture.NoExtensionAssetName}.* \[option providers\] \[extension option providers\]
@@ -94,7 +94,7 @@ public async Task Help_WhenMSTestExtensionRegistered_OutputHelpContentOfRegister
9494

9595
const string RegexMatchPattern = $"""
9696
Microsoft\(R\) Testing Platform Execution Command Line Tool
97-
Version: \d+\.\d+\.\d+(-.*)?
97+
Version: .+
9898
RuntimeInformation: .+
9999
Copyright\(c\) Microsoft Corporation\.  All rights reserved\.
100100
Usage {TestAssetFixture.MSTestAssetName}.* \[option providers\] \[extension option providers\]

test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/InfoTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ public async Task Info_WhenNoExtensionRegistered_OutputDefaultInfoContent(string
2727

2828
string regexMatchPattern = $"""
2929
Microsoft\(R\) Testing Platform Execution Command Line Tool
30-
Version: \d+\.\d+\.\d+(-.*)?
30+
Version: .+
3131
RuntimeInformation: .+
3232
Copyright\(c\) Microsoft Corporation\.  All rights reserved\.
3333
Microsoft Testing Platform:
34-
Version: \d+\.\d+\.\d+(-.*)?
34+
Version: .+
3535
Dynamic Code Supported: True
3636
Runtime information: .+({Environment.NewLine} Runtime location: .+)?
3737
Test module: .+{TestAssetFixture.NoExtensionAssetName}.*
3838
Built-in command line providers:
3939
PlatformCommandLineProvider
4040
Name: Platform command line provider
41-
Version: \d+\.\d+\.\d+
41+
Version: .+
4242
Description: Microsoft Testing Platform command line provider
4343
Options:
4444
--client-host
@@ -120,7 +120,7 @@ public async Task Info_WhenNoExtensionRegistered_OutputDefaultInfoContent(string
120120
Registered command line providers:
121121
TestingFrameworkExtension
122122
Name: Microsoft Testing Framework
123-
Version: \d+\.\d+\.\d+
123+
Version: .+
124124
Description: Microsoft Testing Framework\. This framework allows you to test your code anywhere in any mode \(all OSes, all platforms, all configurations\.\.\.\)\.
125125
Options:
126126
--treenode-filter
@@ -146,7 +146,7 @@ public async Task Info_WhenMSTestExtensionRegistered_OutputInfoContentOfRegister
146146
Registered command line providers:
147147
MSTestExtension
148148
Name: MSTest
149-
Version: \d+\.\d+\.\d+(-.*)?
149+
Version: .+
150150
Description: MSTest Framework for Microsoft Testing Platform
151151
Options:
152152
--settings

0 commit comments

Comments
 (0)