Files
runner-images/images/linux/scripts/tests/Common.Tests.ps1
T

53 lines
1.3 KiB
PowerShell
Raw Normal View History

Describe "PHP" {
[array]$testCases = (Get-ToolsetContent).php.versions | ForEach-Object { @{phpVersion = $_} }
It "php <phpVersion>" -TestCases $testCases {
param (
[string] $phpVersion
)
"php$phpVersion --version" | Should -ReturnZeroExitCode
"php-config$phpVersion --version" | Should -ReturnZeroExitCode
"phpize$phpVersion --version" | Should -ReturnZeroExitCode
}
It "PHPUnit" {
"phpunit --version" | Should -ReturnZeroExitCode
}
It "Composer" {
"composer --version" | Should -ReturnZeroExitCode
}
It "Pear" {
"pear" | Should -ReturnZeroExitCode
}
It "Pecl" {
"pecl" | Should -ReturnZeroExitCode
}
2020-12-29 10:02:46 +03:00
}
Describe "Swift" -Skip:(Test-IsUbuntu22) {
2020-12-29 10:02:46 +03:00
It "swift" {
"swift --version" | Should -ReturnZeroExitCode
}
It "swiftc" {
"swiftc --version" | Should -ReturnZeroExitCode
}
It "libsourcekitd" {
"/usr/local/lib/libsourcekitdInProc.so" | Should -Exist
}
2020-12-29 10:02:46 +03:00
}
Describe "PipxPackages" {
2021-04-13 17:13:46 +03:00
[array]$testCases = (Get-ToolsetContent).pipx | ForEach-Object { @{package=$_.package; cmd = $_.cmd} }
2020-12-29 10:02:46 +03:00
It "<package>" -TestCases $testCases {
"$cmd --version" | Should -ReturnZeroExitCode
2020-12-29 10:02:46 +03:00
}
}