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

48 lines
1.2 KiB
PowerShell
Raw Normal View History

Describe "PHP" {
2023-12-14 17:33:34 +01:00
$testCases = (Get-ToolsetContent).php.versions | ForEach-Object { @{PhpVersion = $_} }
It "php <phpVersion>" -TestCases $testCases {
2023-12-14 17:33:34 +01:00
"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:((-not (Test-IsUbuntu20)) -and (-not (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" {
2023-12-14 17:33:34 +01:00
$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
}
}