[Windows] Add Adoptium (Temurin-Hotspot) jdk 17 LTS (#4129)

This commit is contained in:
Mikhail Koliada
2021-09-24 11:05:25 +03:00
committed by GitHub
parent 93b173e9cb
commit ee4eda5e99
4 changed files with 9 additions and 7 deletions

View File

@@ -36,18 +36,20 @@ Describe "Java" {
if ($Version -eq 8) {
$Version = "1.${Version}"
}
$result.Output[0] | Should -Match ([regex]::Escape("openjdk version `"${Version}."))
$outputPattern = "openjdk version `"${Version}"
$result.Output[0] | Should -Match $outputPattern
}
It "Java Adopt Jdk <Version>" -TestCases $adoptJdkVersions {
$adoptPath = Join-Path (Get-ChildItem ${env:AGENT_TOOLSDIRECTORY}\Java_Adopt_jdk\${Version}*) "x64\bin\java"
$result = Get-CommandResult "`"$adoptPath`" -version"
$result.ExitCode | Should -Be 0
if ($Version -eq 8) {
$Version = "1.${Version}"
}
$result.Output[0] | Should -Match ([regex]::Escape("openjdk version `"${Version}."))
$outputPattern = "openjdk version `"${Version}"
$result.Output[0] | Should -Match $outputPattern
}
}