Skip to content

Commit 2e18ef4

Browse files
committed
[TEST] tool-update: Update same version different release tag
1 parent 7032fbb commit 2e18ef4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/dotnet.Tests/CommandTests/ToolUpdateGlobalOrToolPathCommandTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,20 @@ public void GivenAnExistedLowerversionInstallationWhenUpdateAllItCanPrintSuccess
222222
_packageId, LowerPackageVersion, HigherPackageVersion));
223223
}
224224

225+
[Fact]
226+
public void GivenAnExistedPreviewVersionInstallationWhenUpdateToHigherVersionItSucceeds()
227+
{
228+
CreateInstallCommand($"-g {_packageId} --version {HigherPreviewPackageVersion} --verbosity minimal");
229+
_reporter.Lines.Clear();
230+
231+
var command = CreateUpdateCommand($"-g {_packageId} --version {HigherPackageVersion} --verbosity minimal");
232+
command.Execute().Should().Be(0);
233+
234+
_reporter.Lines.First().Should().NotContain(string.Format(
235+
Microsoft.DotNet.Tools.Tool.Install.LocalizableStrings.ToolAlreadyInstalled,
236+
_packageId, HigherPackageVersion));
237+
}
238+
225239
[Fact]
226240
public void GivenAnExistedHigherversionInstallationWhenUpdateToLowerVersionItErrors()
227241
{

0 commit comments

Comments
 (0)