From 5e08dc3bf4cdb45531759c28484e813b240eb13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Wed, 24 Jan 2024 14:01:27 +0100 Subject: [PATCH] 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. --- .../HelpTests.cs | 4 ++-- .../InfoTests.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpTests.cs index 6125275572..055850d4a6 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpTests.cs @@ -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\] @@ -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\] diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/InfoTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/InfoTests.cs index d3190d102d..359a337588 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/InfoTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/InfoTests.cs @@ -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 @@ -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 @@ -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