mirror of
https://github.com/actions/go-versions
synced 2024-11-21 19:52:39 +00:00
Update Go.Tests.ps1
This commit is contained in:
parent
ba76e8ae2e
commit
e60f915e0b
1 changed files with 8 additions and 7 deletions
|
@ -24,14 +24,15 @@ Describe "Go" {
|
|||
}
|
||||
|
||||
It "version is correct" {
|
||||
[version]$Version = $env:VERSION
|
||||
$versionOutput = (Invoke-Expression -Command "go version") -split " " | Select-Object -Index 2 -replace "go", ""
|
||||
$finalVersion = $Version.ToString(3)
|
||||
If ($Version.Build -eq "0"){
|
||||
$finalVersion = $Version.ToString(2)
|
||||
[version]$Version = $env:VERSION
|
||||
$versionOutput = Invoke-Expression -Command "go version"
|
||||
$finalVersion = $Version.ToString(3)
|
||||
If ($Version.Build -eq "0"){
|
||||
$finalVersion = $Version.ToString(2)
|
||||
}
|
||||
$versionOutput | Should -Match $finalVersion
|
||||
}
|
||||
$versionOutput | Should -Match $finalVersion
|
||||
}
|
||||
|
||||
|
||||
It "is used from tool-cache" {
|
||||
$goPath = (Get-Command "go").Path
|
||||
|
|
Loading…
Reference in a new issue