Pass the correct version suffix in the build scripts
This commit is contained in:
parent
8c902a1954
commit
566a76e5d3
2 changed files with 36 additions and 6 deletions
30
test/dotnet.Tests/VersionTest.cs
Normal file
30
test/dotnet.Tests/VersionTest.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Cli;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
using FluentAssertions;
|
||||
|
||||
namespace Microsoft.DotNet.Tests
|
||||
{
|
||||
public class GivenDotnetSdk : TestBase
|
||||
{
|
||||
[Fact]
|
||||
public void VersionCommandDisplaysCorrectVersion()
|
||||
{
|
||||
CommandResult result = new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput("--version");
|
||||
|
||||
result.Should().Pass();
|
||||
Regex.IsMatch(result.StdOut.Trim(), @"[0-9]{1}\.[0-9]{1}\.[0-9]{1}-[a-zA-Z0-9]+-[0-9]{6}$").Should()
|
||||
.BeTrue($"Unexpected dotnet sdk version - {result.StdOut}");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue