From 484f52594b4d4cc0db6b9edea840cabf516074d3 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 15:44:39 +0300 Subject: [PATCH] fixed "version is correct" test --- tests/Go.Tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 5fcf868..b9a393c 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,8 +24,9 @@ Describe "Go" { } It "version is correct" { - $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match "go version go$Version linux/amd64" + $(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null + $versionOutput = $Matches.Version + $versionOutput | Should -Match $Version } It "is used from tool-cache" {