Skip to content

Commit

Permalink
Simplify version regex pattern
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Evangelink committed Jan 24, 2024
1 parent db27b1b commit 5e08dc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task Help_WhenNoExtensionRegistered_OutputDefaultHelpContent(string

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

const string RegexMatchPattern = $"""
Microsoft\(R\) Testing Platform Execution Command Line Tool
Version: \d+\.\d+\.\d+(-.*)?
Version: .+
RuntimeInformation: .+
Copyright\(c\) Microsoft Corporation\.  All rights reserved\.
Usage {TestAssetFixture.MSTestAssetName}.* \[option providers\] \[extension option providers\]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ public async Task Info_WhenNoExtensionRegistered_OutputDefaultInfoContent(string

string regexMatchPattern = $"""
Microsoft\(R\) Testing Platform Execution Command Line Tool
Version: \d+\.\d+\.\d+(-.*)?
Version: .+
RuntimeInformation: .+
Copyright\(c\) Microsoft Corporation\.  All rights reserved\.
Microsoft Testing Platform:
Version: \d+\.\d+\.\d+(-.*)?
Version: .+
Dynamic Code Supported: True
Runtime information: .+({Environment.NewLine} Runtime location: .+)?
Test module: .+{TestAssetFixture.NoExtensionAssetName}.*
Built-in command line providers:
PlatformCommandLineProvider
Name: Platform command line provider
Version: \d+\.\d+\.\d+
Version: .+
Description: Microsoft Testing Platform command line provider
Options:
--client-host
Expand Down Expand Up @@ -120,7 +120,7 @@ public async Task Info_WhenNoExtensionRegistered_OutputDefaultInfoContent(string
Registered command line providers:
TestingFrameworkExtension
Name: Microsoft Testing Framework
Version: \d+\.\d+\.\d+
Version: .+
Description: Microsoft Testing Framework\. This framework allows you to test your code anywhere in any mode \(all OSes, all platforms, all configurations\.\.\.\)\.
Options:
--treenode-filter
Expand All @@ -146,7 +146,7 @@ public async Task Info_WhenMSTestExtensionRegistered_OutputInfoContentOfRegister
Registered command line providers:
MSTestExtension
Name: MSTest
Version: \d+\.\d+\.\d+(-.*)?
Version: .+
Description: MSTest Framework for Microsoft Testing Platform
Options:
--settings
Expand Down

0 comments on commit 5e08dc3

Please sign in to comment.